Sponsored Content
Top Forums Shell Programming and Scripting changing permission using FTP Post 302144380 by Perderabo on Wednesday 7th of November 2007 07:08:07 PM
Old 11-07-2007
The ftp protocol does not specify anything about file permissions. Many unix based ftp servers have implemented a site command based chmod facility. Some unix based ftp clients even have a chmod command to invoke the site command. When the server has a chmod facility, it may impose additional restictions beyond what the underlying file systems has. You need to check the docs for that particular server. I have never seen any ftp server fully implement the unix chmod command. Not allowing a ftp based chmod to effect a directory is a common restriction. Disallowing suid, sgid and sticky bits are also very common restrictions..possibly even universal restrictions.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Ftp permission 644

On Sun Solaris 8 I would like a user to post via FTP a file with a put command with higher permission than the standard 644. For instance 664. I don't know how to perform it. Thank you in advance. (4 Replies)
Discussion started by: cagnod
4 Replies

2. UNIX for Dummies Questions & Answers

changing permission using scripts

I have been trying to create a script that changes the user rights to read in the 'other' group across directories. The problem I'm having is that when i execute the script, the permissions of the directories remains the same. HELP (8 Replies)
Discussion started by: BigTool4u2
8 Replies

3. AIX

FTP File Permission

Hi Guys, I need help on how to configure file permission to be set to 755 whenever user ftp the files from their notebook to the AIX server. Currently when the user ftp the files, the default permission is 640. Please help me to vi the required files. Thankx RaYbAkH (1 Reply)
Discussion started by: raybakh
1 Replies

4. Red Hat

changing wtmp ownership and permission

Hi, I am using redhat AS 3. Recently, I was asked to implement a security control on the OS: to change ownership of /var/log/wtmp to root:sys and permission to 600. However, when I made the change and reboot the machine, everything was reverted. How come? Please help. The following is the... (1 Reply)
Discussion started by: voa2mp3
1 Replies

5. UNIX for Dummies Questions & Answers

ftp transfer permission denied

I am using a Cobalt Raq4 with Apache web server. I am trying to set the intermediate SSL certificate. I have edited httpd.conf and have created the intermediate SSL certificate text file. However when I try to upload the text file via ftp I get a "Permission denied" message. I am the server... (1 Reply)
Discussion started by: dennisheazle
1 Replies

6. Shell Programming and Scripting

how to exclude file when changing permission

I have files as below: erf100.sh erf101.sh erf102.sh erf103.sh erf104.sh erf105.sh I can easily change permission of all files to 755 by issuing command below: chmod 755 erf*.sh; how do i change permission of all files but excluding file erf102.sh? thanks best regards (2 Replies)
Discussion started by: khchong
2 Replies

7. Shell Programming and Scripting

FTP Files should get full permission

Hi All, Could any one please help me in performing the following? We have the following folder: /home/test/proj1 /home/test/proj2 /home/test/proj3 Users from different country places files in this folder using FTP (These users uses different flavors of FTP tools). Our... (1 Reply)
Discussion started by: vfrg
1 Replies

8. Shell Programming and Scripting

Changing file permission recursively

I have a directory named DIR. The contents of the directory is something like: a.sh b.sh cghsk.sh assjsjkd gdshddll DFG/ ... ... Where only DFG/ is a folder. I want to grant execute permission to all(a+x), for all the files directly under the DIR directory except the files that... (4 Replies)
Discussion started by: proactiveaditya
4 Replies

9. Shell Programming and Scripting

Changing file permission upon creation in a directory

I want to change the permission of a file when it gets created in a particular directory. For instance, I have directory MyDir. Everytime a file gets created in that directory, I would like to change the permission to 777. The context is that I have a 3rd party appication running as root. Only... (2 Replies)
Discussion started by: laiko
2 Replies

10. UNIX for Dummies Questions & Answers

Permission denied when changing root password after reset

I have a Solaris 10 machine that I didn't know the root password to so I went into single user mode and removed the password from the shadow file and rebooted and I am able to login with no password now. But my problem is that when I try to change the root password from no password to something... (0 Replies)
Discussion started by: darkone_d1_2000
0 Replies
FTP_FGET(3)								 1							       FTP_FGET(3)

ftp_fget - Downloads a file from the FTP server and saves to an open file

SYNOPSIS
bool ftp_fget (resource $ftp_stream, resource $handle, string $remote_file, int $mode, [int $resumepos]) DESCRIPTION
ftp_fget(3) retrieves $remote_file from the FTP server, and writes it to the given file pointer. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $handle - An open file pointer in which we store the data. o $remote_file - The remote file path. o $mode - The transfer mode. Must be either FTP_ASCII or FTP_BINARY. o $resumepos - The position in the remote file to start downloading from. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 ftp_fget(3) example <?php // path to remote file $remote_file = 'somefile.txt'; $local_file = 'localfile.txt'; // open some file to write to $handle = fopen($local_file, 'w'); // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to download $remote_file and save it to $handle if (ftp_fget($conn_id, $handle, $remote_file, FTP_ASCII, 0)) { echo "successfully written to $local_file "; } else { echo "There was a problem while downloading $remote_file to $local_file "; } // close the connection and the file handler ftp_close($conn_id); fclose($handle); ?> SEE ALSO
ftp_get(3), ftp_nb_get(3), ftp_nb_fget(3). PHP Documentation Group FTP_FGET(3)
All times are GMT -4. The time now is 04:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy