1844227 Members
2846 Online
110230 Solutions
New Discussion

FTP and file permissions

 
SOLVED
Go to solution
Yogeeraj
Advisor

FTP and file permissions

Hello experts,

Please guide.

when i FTP files to my server (k250; HP-UX10.20), the file permissions do not come out well. (775)

For Example, when after i have ftped my file wa100.sql,i get the following:
K250: home/yd>ll wa100*
-rw-r----- 1 yd it 61210 Oct 22 10:25 wa100.sql
I want the 'g' to be 'rw' and the 'o' to be 'r'

On the other hand, when i do a simple file creation operation, it is 100% OK
K250: home/yd>ls -al > test1.txt
K250: home/yd>ls -al test1.txt
-rw-rw-r-- 1 yd it 5851 Oct 22 12:18 test1.txt
K250: home/yd>

Thank you very much for your help and guidance.

Best Regards
Yogeeraj
4 REPLIES 4
Michael Tully
Honored Contributor
Solution

Re: FTP and file permissions

Hi,

You can change the file creation in '/etc/inetd.conf'
as 022 so that the file when created is
created as 644
Make sure that after changing inetd that
you run 'inetd -c' so that the config file
is re-read.

HTH
-Michael
Anyone for a Mutiny ?
Stefan Farrelly
Honored Contributor

Re: FTP and file permissions


When you ftp files use the umask command (in ftp) which will reset it before you transfer.

See man ftp
Im from Palmerston North, New Zealand, but somehow ended up in London...
Thierry Poels_1
Honored Contributor

Re: FTP and file permissions

Hi,

when creating plain files, the user's umask is used to define file permission.
FTP however uses it's own umask (default = 027). To modify this edit /etc/inetd.conf, add -u parameter for ftpd, and reread inetd.conf file (inetd -c).
see man pages for inetd & ftpd

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Marcin Wicinski
Trusted Contributor

Re: FTP and file permissions

Hi,

1. put -u option to ftp line in /etc/inetd.conf file
2. inetd -c
3. new ftp session will work with new umask

Later,
Marcin Wicinski