1748256 Members
3970 Online
108760 Solutions
New Discussion юеВ

Re: FTP file permission.

 
SOLVED
Go to solution
Davis Paul
Valued Contributor

FTP file permission.

Hi all,
I need to ftp one file from my windows system to HP-UX machine, and how can I set the 777 permission for that file? In ftp prompt тАШ remote site chmod 777 тАЩ is not working with me. Any hind to achieve this will be highly appreciated.
Thanks in Advance,
Davis Paul.
10 REPLIES 10
Suraj K Sankari
Honored Contributor

Re: FTP file permission.

Hi,

At the time of ftping you cannot change the file permission into 777, for that you need to login and use chmod command.

or you can set umask 000 to get the file permisson value 777

Suraj
Ganesan R
Honored Contributor

Re: FTP file permission.

Hi Davis,

You need to set/change the umask value in inetd.conf file like below.

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

#inetd -c

But note that, files will get only 666 only directories will get 777
Best wishes,

Ganesh.
sarfaraj ahmad
Trusted Contributor

Re: FTP file permission.

chmod will not work in windows.
you can set umask value 000 to users profile in HPUX to create files and folders with maximum permission and then logout and login again, but it will also make files with the permission of 666 through normal user login into HPUX server and 640 with ftp from windows.

you have to be change the file permission from HPUX with chmod command according to your requirement.
Davis Paul
Valued Contributor

Re: FTP file permission.

I am trying with the command- "remote site chmod 666 dd.txt"
But its not working....Please check the attached output.

Davis
Steven Schweda
Honored Contributor

Re: FTP file permission.

Does your FTP client want:
remote site chmod 777
or:
site chmod 777

Is chmod enabled on the server?

man ftpaccess

(Look for "Permission Capabilities".)
Davis Paul
Valued Contributor

Re: FTP file permission.

This is the content of ftpacces file.

----------------------------------------------------------------------------
# all the following default to "yes" for everybody
delete no guest,anonymous # delete permission?
overwrite no guest,anonymous # overwrite permission?
rename no guest,anonymous # rename permission?
chmod yes anonymous # chmod permission?
umask yes anonymous # umask permission?
mkd no guest,anonymous,ftpguest
------------------------------------------------------------
Aneesh Mohan
Honored Contributor
Solution

Re: FTP file permission.

Dear Davis,

On windows you can use the below command to change the umask .


ftp> quote site umask 000

example:-

ftp> quote site umask 222
200 UMASK set to 222 (was 000)
ftp> put profile
200 PORT command successful.
150 Opening ASCII mode data connection for profile.
226 Transfer complete.
ftp: 2605 bytes sent in 0.00Seconds 2605000.00Kbytes/sec.
ftp> bye
221 Goodbye.

Regards,
Aneesh
Steven Schweda
Honored Contributor

Re: FTP file permission.

Some basic information might be useful. For
example:

> I need to ftp one file from my windows
> system to HP-UX machine, [...]

Which system is the FTP client, and which is
the server?

HP-UX version? ("uname -a".)

Are you using anonymous FTP or a real user
name and password?

> chmod yes anonymous # chmod permission?
> umask yes anonymous # umask permission?

These seem to grant chmod and umask
permission to "anonymous" users, but not to
"real" users.

man ftpaccess
Bill Hassell
Honored Contributor

Re: FTP file permission.

Why would you EVER want 777 permissions? If these are data files, never give execute permission to such files. 777 will cause problems and that's why the default for umask 000 is 666 for files. Only directories will be created with 777 using umask=000.

666 is almost as bad. It means that every user on the system has the right to destroy and corrupt the data inside the file. Files should be sent to the correct user and assigned proper permissions such as 600 or 640. Allowing anyone except the owner to read or write the file is asking for trouble.


Bill Hassell, sysadmin