1855590 Members
1924 Online
104112 Solutions
New Discussion

Ftp permissions

 
SOLVED
Go to solution
Fabrizio_10
Frequent Advisor

Ftp permissions

Hi again,

I meet this "problem" with ftp server.
When I upload the files, I see the permissions of them, set to: -rw-r-----

My question: is possible to set them to -rw-rw---- automatically, without use chmod after upload ?

Thanks
5 REPLIES 5
Stefan Farrelly
Honored Contributor
Solution

Re: Ftp permissions

see man ftpd
you add the -u umask to the ftpd entry in /etc/inetd.conf
Im from Palmerston North, New Zealand, but somehow ended up in London...
Fabrizio_10
Frequent Advisor

Re: Ftp permissions

Thanks Stefans,

I've added -u 002 to my ftp row into inet.conf and now works fine.

Just for curiosity: if I try ftp to both unix machine, it keeps the correct permission.
If I try to put a file in ftp from a windows machine it assign casual permission.
Correct me if I wrong: this fact because windows doesn't know any about permission ?

Thanks
john korterman
Honored Contributor

Re: Ftp permissions

Hi Fabrizio,
if you use /etc/ftpd/ftpaccess - which I think you do - you can use the "upload" keyword for defining the "mode" of uploaded files; please, consult the man page for ftpaccess.

regards,
John K.
it would be nice if you always got a second chance
Yogeeraj_1
Honored Contributor

Re: Ftp permissions

E.g.
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 002 -a

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Ftp permissions

E.g.

# specify the upload directory information
upload /var/ftp * no
upload /var/ftp /incoming yes root daemon 0600 dirs
upload /var/ftp /bin no
upload /var/ftp /etc no
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)