cancel
Showing results for 
Search instead for 
Did you mean: 

change mode of unix file using ftp

0 Kudos

I want change the unix file permission at the time of ftp.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

1. Depending on the ftp server you can set the umask on a per-user basis.

You could have the script log in as a dedicated user with a 022 umask.

2. You can also use a 3rd party FTP client (like CuteFP etc.,) allows you to set permission for files and directories on your remote host during transfer. This function is often called chmod or set permissions in the program menu.

3. Some machines allow you to preset in special files (.htaccess) as well

Hope this helps

Cheers

Senthil

0 Kudos

thanks,

but, i want change the permission of the file during the execution of ftp batch file.

after copying the file, i want to chmod 777 through ftp command.

Former Member
0 Kudos

Hi

You should setup a secure anonymous ftp server..

Modern ftp daemons support all kinds of useful commands, such as chmod, that allow outsiders to undo your careful permission settings. They also have configuration options (WuFTP) to acheive this.

You should ask your FTP (wu-ftp)server admin to enable extention set.

Your windows client does not support a chmod command.

In such case, chmod via the quote command with your client should

support. Something like

<b><i>ftp> quote site chmod yyy fileName</i></b>

where "yyy" is the octal number for the permission

Hope this helps

Regards

Senthil

0 Kudos

ok.

this command is working.

but it is working for specific file.

i want to run this command for the all *.txt files in the directory.

ftp>quote site "chmod 777 *.txt"

Former Member
0 Kudos

"<b>chmod</b>" will work for files <b>only</b> if ftp user is a owner / or has administrative access

You can check the access rights or login with suitable user and then apply chmod command.

You can also see "<i>chown</i>" or "<i>chgrp</i>" for group changing..

Regards

Senthil

0 Kudos

Thanks,

Former Member
0 Kudos

Missing reward points !!

Cheers

Senthil

0 Kudos

it is giving message, reward point already given.