1753356 Members
4932 Online
108792 Solutions
New Discussion юеВ

FTP permissions 11iv3

 
shashi kanth
Super Advisor

FTP permissions 11iv3

with "man ftpd", i got the option "-u" which will change default ftpd umask from 027 to the specified umask value.

But through FTP, if i create a directory, the permission it is inheriting is 022 (not 027).

In the inetd.conf file, i have added the option with respect to my requirement to the ftpd server.

ftpd -l -u 1575.

after i do "inetd -c", in the syslog i found "bad value for -u".

so how can i set "sticky bit" with permissions what i am looking for with ftpd ?

Thanks.
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: FTP permissions 11iv3

>if I create a directory, the permission it is inheriting is 022 (not 027).

umask works by "subtracting" permissions. 022 removes group and other write. 1575 doesn't make sense. It says remove all but user and other write:
$ typeset -i8 x=$(( ~8#1575 & 8#666 )); echo $x
8#202

>so how can I set "sticky bit" with permissions what I am looking for with ftpd?

You can't. You can only set it by chmod or an evil application that fiddles with execute and sticky bits.
johnsonpk
Honored Contributor

Re: FTP permissions 11iv3

Hi Shashi Kanth,

you cannot set stcky/setuid/setgid permissions with umask command .Means out of four digits in the umask command the first digit should be zero

Rgds
Johnson
shashi kanth
Super Advisor

Re: FTP permissions 11iv3

OK. I have done "202".

with regards to the sticky bit, if we can't specify it with umask, any script/program which is freely available that will check for any newly created directories and set the sticky bit ?
Dennis Handly
Acclaimed Contributor

Re: FTP permissions 11iv3

>I have done "202".

What do you mean? 202 permission is petty useless.

>with regards to the sticky bit, if we can't specify it with umask, any script/program which is freely available that will check for any newly created directories and set the sticky bit?

You can write a cron script to look and change your directories.
Dennis Handly
Acclaimed Contributor

Re: FTP permissions 11iv3

>if we can't specify it with umask,

If you are creating directories in ftp, you can also use the chmod command to add the sticky bit:
ftp> mkdir Stuff_sticky
ftp> ls "-d Stuff_sticky"
drwxr-xr-x Stuff_sticky
ftp> chmod 1755 Stuff_sticky
ftp> ls "-d Stuff_sticky"
drwxr-xr-t Stuff_sticky
shashi kanth
Super Advisor

Re: FTP permissions 11iv3


Thank you all.