0

I'm new to Linux and it's command line and I need to change user rights on FTP server. The situation is like this:

I have a Debian server (without GUI, only with command line) with FTP server. And I have 2 users. Root (all access) and webmaster (limited user). Webmaster can upload files via FTP, but these get permission 600 (chmod 0600). But I need 0777.

How or where can I change this? I can log in as the root but I don't know how to manage FTP users.

I probably need to change "umask" for webmaster. I don't know what FTP software is my Linux using. I found file etc/login.defs with value #UMASK 022, but it is commented.

Can anyone help please? Explanatory link for beginners would be enought.

Racky
  • 1,173
  • 18
  • 24

1 Answers1

1

This depends on which package you use to provide your ftp server program. With some programs you can specify a default umask on the daemon's command line. With vsftpd you can specify it in /etc/vsftpd.conf. Here's a snippet from the default config file:

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022

I think clients can also change their umask from the default from within an ftp shell.

Alex Zeffertt
  • 1,462
  • 11
  • 12
  • PS: Most people use scp now rather than ftp. It's more secure, and doesn't require NAT gateways, and just better all round :-) – Alex Zeffertt Jan 18 '13 at 16:57
  • Thanks for recommendation, I will try it after weekend. PS: SCP is not allowed in our network, but if I figure out how to use it via Windows command line, I can give it a try. Thanks for second hint :) – Racky Jan 19 '13 at 08:52
  • .. And how do I recognize what FTP software is my Linux using, please? – Racky Jan 21 '13 at 06:19
  • So I found the file /etc/vsftpd.conf. Now how to edit it :) vi doesn't work.. Linux is neverending fight for me :) – Racky Jan 21 '13 at 06:59
  • Done! :) I really had to go to file /etc/vsftpd.conf and set value local_umask = 000. Than restart FTP using command "/etc/init.d/vsftpd restart" than test if FTP was running using "/etc/init.d/vsftpd start" and log off and back on in my FTP client.I got rights 666 on each newly uploaded file. – Racky Jan 21 '13 at 08:23