1834327 Members
2123 Online
110066 Solutions
New Discussion

using ftpaccess file

 
SOLVED
Go to solution
itai weisman
Super Advisor

using ftpaccess file

hi everyone,
I need to change the configuration of the FTP in one of my production servers.
i need to set the umask of incoming files, for only one specific user, for only one and specific directory.
i need all other configuration, to stay the same as it is today.
any ideas what should i do?
Thanks everyone
itai
10 REPLIES 10
RAC_1
Honored Contributor

Re: using ftpaccess file

There is a sample file in /usr/newconfig/etc/ftpd/examples/ftpaccesses
There is no substitute to HARDWORK
itai weisman
Super Advisor

Re: using ftpaccess file

i'm pretty afraid of it, and i didn't understood from it what should i do in order to make sure other configuration won't be change when i add this file.
i also didn't understand what should i do to define the mask i want to use.
in other words, what i need is :
1. set umask for one specific user
2. make sure other configuration won't change.
Ermin Borovac
Honored Contributor
Solution

Re: using ftpaccess file

To change umask for specific directory look into using upload directive in /etc/ftpd/ftpaccess.

upload yes

In addition to this you will need at least one class directive, similar to

class all real *

This would allow all users who have account to access the server via ftp.

Don't forget to add -a to ftpd line in /etc/inetd.conf and run inetd -c.
itai weisman
Super Advisor

Re: using ftpaccess file

thanks,
that's exactly what i needed.
by the way - "class" can receive user or the word "all" that applies to all users, right - i mean like
class
class all
is that correct?
itai weisman
Super Advisor

Re: using ftpaccess file

hey,
it doesn't work... i set permission for 0 and i received 640 .... any ideas?
Ermin Borovac
Honored Contributor

Re: using ftpaccess file

Format of the class directive is as follows

class [ ... ]

is arbitrary string.
is comma separated list of any of the following keywords: anonymous, guest and real. Keyword "anonymous" is used for anonymous FTP access, "guest" is used for guest accounts and "real" is used for users with real accounts.
is domain name or numeric address allowing wildcards.

Assuming that you are setting this up for user "ftpuser", whose home directory is /home/ftpuser and directory where you want to set mode (say 0777) is /home/ftpusers/incoming, you would have the following line in ftpaccess file.

upload /home/ftpuser /home/ftpuser/incoming yes ftpuser ftpgroup 0777

Please check ftpaccess man page for more details.

itai weisman
Super Advisor

Re: using ftpaccess file

i tried that... it doesn't work...
attached my ftpaccess file.
i'm trying to configure files that user itaiw put in directory
/home/users/itaiw will have mask of 777 and it doesn't work... what am i doing wrong?
(files have mask of 644)
i added to ftpd the flags "-la" (logfile and ftpaccess file
thanks
itai
RAC_1
Honored Contributor

Re: using ftpaccess file

Did you restart ftpd??
There is no substitute to HARDWORK
itai weisman
Super Advisor

Re: using ftpaccess file

sure.
inetd -c.
Ermin Borovac
Honored Contributor

Re: using ftpaccess file

Can you please try the following line in ftpaccess?

upload /home/users/itaiw * yes itaiw users 0777 dirs