Operating System - Linux
1822318 Members
6076 Online
109642 Solutions
New Discussion юеВ

Files Permission using ftp

 
Edwin Ruiz_2
Super Advisor

Files Permission using ftp

Hi!

I am putting files using ftp to my Blade server with REdhat A.S 3.0. These files have permission -rw-r----- , i need all permission in this file when i put in my sever. I changed umask on .profile but doesnt work. Somebody can helpme!
7 REPLIES 7
MattJ123
Frequent Advisor

Re: Files Permission using ftp

while in ftp issue the chmod 0777 file-name command.

umask could be used as well, you would need to first change the parent directory to have the permisions you desire, and set the umask to not remove any bits.. or just the bits that are appropriate, should you ever want to lock it down a little more than 777.

I wouldn't suggest using umask, as setting this a to low of a value could cause inherited security risks. Stick with chmod via ftp.
Chris Xu
Trusted Contributor

Re: Files Permission using ftp

As owner of the file or root, type this command before putting it via ftp:
$ chmod 777 filename

Do not use umask, because it will cause all your future files to have world permissions when you create them. In addition, "umask" is not used to change permissions. Use "chmod" to do it.

Chris
Edwin Ruiz_2
Super Advisor

Re: Files Permission using ftp

Thans Matthew.. but umask does not work with ftp.. only with telnet or ssh.


On HP-UX i edit /etc/inetd.conf and i add this line


ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l

But on linux does not work
Edwin Ruiz_2
Super Advisor

Re: Files Permission using ftp

Thkns chris.. but i am sending files from Windows to linux.. defaul permissons are -rw-r-r
Chris Xu
Trusted Contributor

Re: Files Permission using ftp

Check out the ftp config file under /etc/xinetd.d
If you use gssftp, the config file is called gssftp.

Chris
MattJ123
Frequent Advisor

Re: Files Permission using ftp

I do not believe the default Windows ftp client supports the chmod command, but unix ftp clients do.

You may want to consider using a third party application, as if you are using a third party ftp client, it would likely include chmod functionality.



John Poff
Honored Contributor

Re: Files Permission using ftp

Hi,

If you are using AS 3.0 you are probably running the vsftpd ftp daemon. If so, the config file for this is /etc/vsftpd.conf, and there is a setting in there named 'local_umask' which sets the umask for local users. The default is 077. You can try changing this value and see if that does what you are looking for.

JP