Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 9th, 2005, 07:26 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Warning: chmod(): Operation not permitted

Hello everyone;

I am attempting to write a generic FileManager app that anyone can upload to their server and use to upload, rename, view and delete files on the server.

I cannot expect my users to change the permissions on each individual directory that they want to upload to or rename so I've been trying to do it through my PHP App. I also don't have access to any of the server settings except through cPanel.

However, when I try to run chmod() or chown() I get something very similar to the following:

Quote:
quote:Warning: chmod(): Operation not permitted in /home2/davidko/public_html/filemanager/test.php on line 69


Does anyone have a solution to this, please? These are the final items I need to get working in order to finish this app!

Thank you in advance!

- Mr. Cantrell
 
Old January 20th, 2005, 06:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It seems that the webserver/PHP user does not have access on your filesystem to change the file attributes. You'll need to modify the permissions of your directory to allow the webserver user to modify file permissions. Perhaps you can create a user group where the only two members of the group are you and the webserver user. Then give rwx permissions to the group in that directory.


Take care,

Nik
http://www.bigaction.org/
 
Old January 20th, 2005, 06:08 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any idea on how to do that? I'm using what I assume is a virtual server and cPanel to control it.

Thank you,

David

Quote:
quote:Originally posted by nikolai
 It seems that the webserver/PHP user does not have access on your filesystem to change the file attributes. You'll need to modify the permissions of your directory to allow the webserver user to modify file permissions. Perhaps you can create a user group where the only two members of the group are you and the webserver user. Then give rwx permissions to the group in that directory.


Take care,

Nik
http://www.bigaction.org/
- Mr. Cantrell





Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Warning... jch02140 C++ Programming 1 September 29th, 2006 07:48 AM
Security Warning ggiibboo Access 0 January 3rd, 2006 03:11 AM
Warning Message AMP_Engineer BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 4 September 29th, 2004 08:55 PM
Warning Messages Varg_88 Beginning VB 6 1 June 8th, 2004 12:10 AM
chmod lostroad Pro PHP 9 May 27th, 2004 04:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.