Operating System - HP-UX
1834285 Members
2967 Online
110066 Solutions
New Discussion

Re: using ftpaccess to restricted user for making sub dir

 
Clarence Lee
Regular Advisor

using ftpaccess to restricted user for making sub dir

Dear all,
I have created a user as canftp.
passwd file entry:-
ctnftp:h/PyNpYI:500:103:,,,:/canteen/transfer/:/usr/bin/false

ftpaccess file entries:-
## upload /var/ftp * no
## upload /var/ftp /incoming yes root daemon 0600 dirs
## upload /var/ftp /bin no
## upload /var/ftp /etc no
upload /canteen/transfer * no
upload /canteen/transfer /upload yes ctnftp ftpgroup 0600 nodirs
upload /canteen/transfer /download no ctnftp ftpgroup 0666 nodirs

when user ctnftp login, it does login successully to the home of /canteen/transfer.
drwxrwxrwx 2 ctnftp ftpgroup 96 Sep 8 21:20 download
dr-xr-xr-x 2 bin bin 96 Sep 9 10:21 etc
drwxrwxrwx 2 ctnftp ftpgroup 96 Sep 9 10:52 upload
dr-xr-xr-x 3 bin bin 96 Sep 8 20:25 usr

question is that when user change group to upload, they are able to mkdir sub directories.

Is there any way, I can restrict this option of making sub-directories and allow them to upload files with permission 666 ?

Base on the current ftpaccess entries, it does not work.
Could anyone please advise me, what should I do ?... Thanks clarence.




4 REPLIES 4
RAC_1
Honored Contributor

Re: using ftpaccess to restricted user for making sub dir

What do you mean by following?
when user change group to upload,

How does he change the group. This is ftponly account.
There is no substitute to HARDWORK
Clarence Lee
Regular Advisor

Re: using ftpaccess to restricted user for making sub dir

Rac,
See the attachement, for the what's I meant.
Regards,clarence
RAC_1
Honored Contributor

Re: using ftpaccess to restricted user for making sub dir

User is able to create dir because he all perms to do so. in your case upload dir has 777 perms, so they can create dir/file under it.

for your second question, you will have to change upload umak to 666
There is no substitute to HARDWORK
Clarence Lee
Regular Advisor

Re: using ftpaccess to restricted user for making sub dir

follow this link to get the answer:-
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=893720

In my case, change the user home from
/canteen/transfer to /canteen/transfer/./upload. (another level upward).

Thank you.

Regards,Clarence.