Disable listing for directory but keep it enabled for subdirecories
Before trying copyparty, I was using my own file server and I had a .noindex file in the root directory to disable directory listing for it, but keep listing enabled for subdirectories. This is a compromise between public and private files, I don't want to gate those directories behind accounts, but neither I want them to be seen by anyone who came randomly or for some another thing.
Another use case I have is a following structure:
work/
.noindex
001_52f9113e5e93930122108dbf5de15637e/
20250123_0001.cr2
20250123_0001.jpg
002_6c487fef83bc2eeab083003dcb90cb566/
...
003_19505ad013840ad12037e8cd697389a2c/
...
Here I want to disable listing for work/, but keep it enabled for subdirectories inside, so that people who know their directory name can see their files.
Describe the idea / solution you'd like
Placing .unlisted or a similarly named empty file should disable directory listing for this single directory. I prefer placing a file instead of editing configuration, but it can be done in configuration too.
Describe any alternatives you've considered
It is possible to do thing with shadowing and g permission, but I consider this syntax overly verbose, and doing this for every single directory I need seems too much.
[/work]
/mnt/zfs/work
accs:
g: *
[/work/001_52f9113e5e93930122108dbf5de15637e]
/mnt/zfs/work/001_52f9113e5e93930122108dbf5de15637e
accs:
r: *
I am also interested in this, but the reverse. I would like to only enable listings for the root directory without having to shadow every single subdirectory.
@seowalex there are some options for this;
- volflag
dk(dirkeys), combined withrpermission for someone to see the dirkeys andgpermission for visitors to use them, lets a user list the toplevel contents of any given folder but no subfolders;python copyparty-sfx.py -a ed:wark -v srv::r,ed:g:c,dkas a oneliner or the following config file:[/pub] /mnt/pub accs: r: admin g: * flags: dk - replace
dkwithdksand they can also see subfolders below the folder they are given the dirkey to view
so if you enable dks and you're careful and only give people the link to their designated toplevel folder, they should be locked into it -- this should cover @Assasans' usecase as well, perhaps?
PLEASE NOTE that I'm not aware of anyone using dk and/or dks -- they have received little testing and may be buggy, so let me know if you hit any issues