1834095 Members
2158 Online
110063 Solutions
New Discussion

Re: FTP permission

 
EML
Advisor

FTP permission

I would like to seek some help regarding ftp. My problem is about when a user put a file to my server and the mode of the file becomes -rw--r--- with his ownership.

How do I make this automatically mode 666? I was looking at 'man ftpacces'. When I looked at /etc/ftpd there was no such file. I tried to make one with the 'upload' content and tried to start ftpd with 'a' option, but its not working. Can anyone help me on this?
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: FTP permission

Hi Ed:

Edit the ftp daemon startup in /etc/inetd.conf. Add the option "-u " like this:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -u 111

Then restart inetd by issuing:

# /usr/sbin/inetd -c

See man (1M) ftpd for more details.

...JRF...
Bill Hassell
Honored Contributor

Re: FTP permission

There is another way which allows setting different permissions for each file:

cd /some_dir
put some_file
quote site chmod 644 some_file

You can also change the ownership with a similar construct:

quote site exec chown billh:users some_file

Not all servers are configured to allow quote site commands.


Bill Hassell, sysadmin