Re: mtree(8) and directory permissions

Igor Sobrado <[email protected]>
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
Igor Sobrado writes:
> 
> Should not be ~ftp, ~ftp/bin, and ~ftp/etc unwritable by anyone
> (mode 0555) instead of 0755?

Ok, ~ftp, ~ftp/bin and ~ftp/etc are mode 0755 by default:

$ ls -la /var/spool/ftp
total 10
drwxr-xr-x   5 root  wheel  512 Oct 24 23:36 .
drwxr-xr-x  11 root  wheel  512 Oct 24 23:36 ..
drwxr-xr-x   2 root  wheel  512 Oct 24 23:36 bin
drwxr-xr-x   2 root  wheel  512 Oct 24 23:36 etc
d--x--x--x   2 root  wheel  512 Oct 24 23:36 hidden

(permissions are different on my laptop as I am playing with an
anonymous FTP area, I want to run one very soon for distributing
a complex set of patches for NetBSD for evaluation before submitting
them in a PR.)

...perhaps it would be advisable removing the write permissions on these
directories to meet the requirements in ftpd(8).  Of course, we can leave
them as they are now too.  :-)

No problem at all with the specification file.

Indeed, union mounting fdesc in /dev modifies the permissions on
the file descriptors as we see them.  But certainly fdesc is something
I really like and will continue using.  fdesc is a clean way to manage
file descriptors.

$ mtree -e -f /etc/mtree/NetBSD.dist 
dev:    permissions (0755, 0555)
dev/fd: permissions (0755, 0555)

All perfect now!  ;)

Best regards,
Igor.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.