Operating System - HP-UX
1752416 Members
6290 Online
108788 Solutions
New Discussion юеВ

Setting UMASK value for FTP only user

 
Md. Minhaz Khan
Super Advisor

Setting UMASK value for FTP only user

Dear All,

I have recently set up an ftp-only account on one of our servers. I'm trying to set the umask to "rw- r-- rw-" i.e 020,but it's not working as expected.

I have done following :

Step 1:

/etc/ftpd/ftpaccess:
********************
upload /home/ftponly/ /home/ftponly/ yes ftponly ftponly 0020 dirs

/etc/inetd.conf:
***************
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a

But i am still get permission "rw- r-- ---" when upload file using "ftponly" user.

Can any one help me what i am missing>>


Note: I dont want to set global umask for FTP
Thanks
Minhaz
8 REPLIES 8
Md. Minhaz Khan
Super Advisor

Re: Setting UMASK value for FTP only user

Dear ALL,

Any help?????
ANy advise ???


Chandrahasa s
Valued Contributor

Re: Setting UMASK value for FTP only user

HI,
edit /etc/inetd.conf as below

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


Chandra
Md. Minhaz Khan
Super Advisor

Re: Setting UMASK value for FTP only user

Dear All,

I have followed "Jeff" post which is as below:

Hi Joe,

Yrs, there's a way to do this on an individual user basis.
Using the /etc/ftpd/ftpacces file you can insert a line as follows:

upload /home/username /path/to/upload/dir yes username groupname 0664

Syntax as follows:
1) upload - function
2) user's defined home dir
3) dir where user will be placing files
4) yes - uploads permitted
5) owner of file uploaded (may be diff than user)
6) same as above for group ownership
7) perms automatically placed on file

As you can see it's the last field that gives you this control. Also note that the 3rd field narrows this statement down to ONLY files coming into THAT dir. If user places in other dirs - you'll need mult statements. The second field narrows it down to the user with THAT dir defined as /home/dir
And as stated earlier this is available on 11.0 & above.

HTH,
Jeff


I have followed but still i did not get my required permission (rw- r-- rw-)

/etc/ftpd/ftpaccess:
====================
upload /geo_cdr/network_files /geo_cdr/network_files yes dwhoper etl 0646

/etc/inetd.conf:
================
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a

/etc/passwd:
============
nss_user:*:124:109::/geo_cdr/network_files/./:/usr/bin/ftpshell

/etc/group:
==========
ftponly::109:


Thanks
Minhaz
Md. Minhaz Khan
Super Advisor

Re: Setting UMASK value for FTP only user

Correction of Previous post:

/etc/ftpd/ftpaccess:
====================
upload /geo_cdr/network_files /geo_cdr/network_files yes nss_user ftponly 0646
Md. Minhaz Khan
Super Advisor

Re: Setting UMASK value for FTP only user

Dear All,

Any help or any advise??

Thanks
Minhaz
Md. Minhaz Khan
Super Advisor

Re: Setting UMASK value for FTP only user

Dear All,

Can any one help me to find the resolution how can i set UMASK for particular FTP user??

Thanks
Minhaz
Md. Minhaz Khan
Super Advisor

Re: Setting UMASK value for FTP only user

Thanks a lot for helping by nobody.

Minhaz