Current location: Hot Scripts Forums » Programming Languages » PHP » Edit file perms through a phpscript


Edit file perms through a phpscript

Reply
  #1 (permalink)  
Old 09-01-05, 07:39 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
Edit file perms through a phpscript

hi all, i'm looking for a function that can change file perms.I need it, cause i'm working on a file listener, and you need to be able to delete files, but in order to do so, the 'execute'-permission of the file needs to be set to all users.

Well, i've been searching the web, but i couldn't find the function to do so.

Many thanx to the one who can help me

Greetz,
UnrealEd

EDIT(5 mins later): I found it, nvr mind:
I had to change the perms of the folder as well, that i did'nt know

Last edited by UnrealEd; 09-01-05 at 07:48 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-02-05, 02:32 PM
skyrat skyrat is offline
Newbie Coder
 
Join Date: Sep 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Hm, I thought that's not possible.

I don't know much about permissions, but what's the point about it if everyone can easily change it through some php script ?

However, could you please post some more about that technique (which function, etc) ?



Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-02-05, 03:41 PM
Venthos Venthos is offline
New Member
 
Join Date: Aug 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
chmod() command. More information:

http://us2.php.net/chmod

You have the same restrictions as if SSH'ing into an account with the username the php file is running as and executing chmod yourself there. It's no different

Thusly they cant chmod /root or something.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP code to edit a text file mdhall Script Requests 12 12-23-10 05:03 AM
FTP file edit via PHP NixMaster PHP 5 02-27-05 11:10 PM
How To Open HTML File & Edit Once a Day cebuy PHP 2 12-13-04 05:03 PM
I need a script that will disable the menu bar (file, edit etc).. Master-Chemist JavaScript 3 03-09-04 03:18 AM
One PHP file to edit another.... drgn91 PHP 10 07-22-03 12:29 PM


All times are GMT -5. The time now is 07:38 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.