Operating System - HP-UX
1753894 Members
7503 Online
108809 Solutions
New Discussion юеВ

how to change the permission of file thru uploading ftp

 
shan_7
Advisor

how to change the permission of file thru uploading ftp

Hi,


one class server 10.20 hp-ux version
whenever one user uploading the file through FTP to server that file should be have the view
permission (666) for all. but now its not like that.its like (640). How to change the file permission when uploading the file.

Help me

Thanks in advance

Shankar
7 REPLIES 7
Sanjay Kumar Suri
Honored Contributor

Re: how to change the permission of file thru uploading ftp

Will umask do the needed job?

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Mobeen_1
Esteemed Contributor

Re: how to change the permission of file thru uploading ftp

Shankar,
As Sanjay has already mentioned i think setting umask to desired value in your profile for the ftp account, may do the job.

Give it a try

rgds
Mobeen
Robert-Jan Goossens
Honored Contributor

Re: how to change the permission of file thru uploading ftp

Hi Shankar,

Modify /etc/inetd.conf and change the line

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

to

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u002

# inetd -c

To reread the inetd conf file.

Hope this helps,
Robert-Jan
Chris Wilshaw
Honored Contributor

Re: how to change the permission of file thru uploading ftp

Although setting umask is a viable option, this sets the FTP mask for ALL users, and if set to allow full read/write access (666) would be considered a security risk.

You can simply use the chmod command within the FTP session to change the permissions once the file has transferred.
Kent Ostby
Honored Contributor

Re: how to change the permission of file thru uploading ftp

Shankar --

I believe the reason for defaulting this way is for security so that if someone gets FTP access to your box they can't push a file on that will run automatically.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
shan_7
Advisor

Re: how to change the permission of file thru uploading ftp

Hi,

i tried umask that is not making any change.

See, users are using one comman user account for ftp. particularly, those are tranfering the files from windows PC's through ftp client software. (Power term FTP client for windows. ver ftp 3.0.3)
so after that only the problem permission denied for that file . so how to change permission. from 640 to 664 for uploading all files from ftp client.

Help please..

Shankar
Sanjiv Sharma_1
Honored Contributor

Re: how to change the permission of file thru uploading ftp