FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 8th, 2001, 06:36 AM
frindler frindler is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Berlin
Posts: 11 frindler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to frindler
recursive FTP

Hi!

I have the following problem:
For my system I need write-access to every file on the server. As they are in many directories and subdirs it would be horrible for the user to change all these attributes manually.

I imagine a php script which connects to the FTP-Server and recursively goes through the directory tree and changes all the attributes to the desired value.

But: I don't have an idea how to do this. Perhaps you could help me!

Thanx


Filip

Reply With Quote
  #2  
Old July 8th, 2001, 11:44 AM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 757 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 32 sec
Reputation Power: 14
Is your server unix? if so it may be easier to create a directory listing vis readdir see www.php.net/readdir and then use some basic unix commands to change the permissions for you,
i.e
<?exec("chmod 777 *.*");?> would chmod all the files in the current directory to 777

not that I would recommend doing this anyway!, perhaps better to check if someone is authorised to modify a file then change the permissions on just that file and change them back after they have done whatever they have to do, via script as above.
__________________
resistance is no longer futile :: 423

Reply With Quote
  #3  
Old July 8th, 2001, 12:03 PM
frindler frindler is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Berlin
Posts: 11 frindler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to frindler
Hi!

This doesn't work because the apache webserver runs under the UNIX account "anonymous". But the creator of the files is my ftp-account called ftpXYZ, so the webserver can't change the file attributes because it isn't the creator of the files.

With files created by the system this works fine, but not with uploaded files.

Thanks for your reply, either.

Filip

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > recursive FTP

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap