On Tuesday 08 February 2011 12:40:04 John Carlyle-Clarke wrote: > On 08/02/11 12:23, Ralph Corderoy wrote: > > Hi Tim, > > > >> Thanks Victor, one stage closer but not quite there, I can now > >> transfer a file by ftp to /var/www/myfolder but the permisson on that > >> folder is -rw------- (600) rather than -rw-r--r-- (644) While I can > >> change the permission via the ftp client is there a way to change the > >> permission when the file lands in the folder automaticly?? > > > > See the local_umask configuration setting in vsftpd.conf(5); default is > > 077. Or better still use your FTP client to change the current umask on > > the remote server after logging in. That way it doesn't affect all > > local users. How to do that depends on your FTP client, but all good > > ones should allow it. If this is a regular upload you're doing, you > > could script it as part of that. > > You may also need to set g+x on the /var/www/myfolder and any sub > folders to allow group members to cd into and list directories. > > One easy way to do this might be to do "chmod -R g=u /var/www/myfolder" > This will set the group perms to be the same as the user perms on all > files and directories. > > You might also want to do "chmod g+s /var/www/myfolder". (You'd also > want to do this on any already existing subdirectories, e.g. find > /var/www/myfolder -type d -exec chmod g+s '{}' \; > > Setting the suid bit like this on directories will make files and > directories created under that folder inherit the group ownership of the > parent. This can be useful is you users belong to primary groups other > than "www" and the FTP server doesn't allow you to specify the group > used for file creation explicitly. > > This will need to be done in conjunction with umask setup Ralph mentioned. > > > -- > Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 > Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ > How to Report Bugs Effectively: http://goo.gl/4Xue
Thanks all for your help, I used Ralph suggestion. There will only be two people maximum ftp-ing files over and that will be from a single account, this is only a small scale thing. This is a new thing and will certainly be learning as the we go. Thanks again Tim -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue