new user questions. (Before I back myself into a corner!)
dave at g8kbv.demon.co.uk
Thu Nov 25 20:00:23 UTC 2010
On 25 Nov 2010 at 9:42, Nathan Vidican wrote:
> Two commands of interest here, 'chmod' and 'chown'. I'd highly suggest
> reading the manpage on both, but here's the short/quick-start version:
> - used to change permissions for a file or directory
> - permissions are broken down into: 2=read, 4=write, 1=execute
> - permissions are displayed in group of three, corresponding to
> owner-group-everyone else
> - so chmod 666 means "make owner,group,everyone each able to read(2)
> write(4) (2+4=6)
> - the first number indicating the owner of the files permission,
> second the group, and the last everyone
> - so when you noted seeing "drwxr-xr-x" - that's 755 (owner
> read+write+execute(7), group read+execute (5), everyone else
> - in order for a user to 'cd' to a directory, the execute permission
> be set
> - to answer your original question then, "chmod 775 <dir_name>" would
> change the permissions to that the group can write as well
> - used to change ownership of a file or directory
> - can change owner, or group ownership
> - syntax is "chown user:group <dir_name>"
> As far as the FTP thing goes, you need to make sure that the shell you
> assign the user is listed in /etc/shells - that's what the system
> 'standard' ftpd is looking for.
> Nathan Vidican
> nathan at vidican.com
Following your lead, and after some more reading, I seem to have it
working as I want. That execute permission bit, is a doozie. If you
hadn't said it's needed for the user (or group member) to be able to 'cd'
to that directory, I'd have been there for hours.
Lots is written about the 'x' bit, and allowing execution of a file, but
not that it affects the ability to even use that directory. I guess in
this context, "using" = "executing", so it sort of makes sense.
I did find though, that the -R switch, doesn't always cause chmod to
alter sub directories in the way one expects. One directory at a time
then, but job done.
It appears too, that if one of the group members then creates a new
direcory, that inherits the permissions of the parent directory.
Next task, to get the ftp server to work on another port. I might just
quit while ahead, and go up the pub though, and leave that till tomorrow.
More information about the freebsd-questions