Re: [PHP] chmod - Opertaion not permitted in ....
Ashley Sheridan wrote: > On Wed, 2009-06-24 at 09:23 -0500, Shawn McKenzie wrote: >> Michael A. Peters wrote: >>> Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: >>> chmod("/aaa/bbb.php", 0777); ?> and I get a warning says "Operations not permitted in ." Anyone met this before? I've done quite a lot reading on Google but couldn't get to it. THanks >>> Many servers do not allow the apache (or php) to change file permissions. >> Most likely the apache user doesn't own the file. You can't CHMOD a >> file if you don't own it. >> >> -- >> Thanks! >> -Shawn >> http://www.spidean.com >> > Well, technically speaking you can, if you are part of the same group > and it has group permissions, technically speaking, No or it has permissions allowing anyone to > modify it :p technically speaking, No > > Thanks > Ash > www.ashleysheridan.co.uk > -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chmod - Opertaion not permitted in ....
On Wed, 2009-06-24 at 09:23 -0500, Shawn McKenzie wrote: > Michael A. Peters wrote: > > Morris wrote: > >> Hi all > >> Got a problem don't know how to get in really.. > >> > >> simple code: > >> >> > >> chmod("/aaa/bbb.php", 0777); > >> > >> ?> > >> > >> and I get a warning says "Operations not permitted in ." > >> > >> Anyone met this before? I've done quite a lot reading on Google but > >> couldn't > >> get to it. > >> > >> THanks > >> > > > > Many servers do not allow the apache (or php) to change file permissions. > > Most likely the apache user doesn't own the file. You can't CHMOD a > file if you don't own it. > > -- > Thanks! > -Shawn > http://www.spidean.com > Well, technically speaking you can, if you are part of the same group and it has group permissions, or it has permissions allowing anyone to modify it :p Thanks Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chmod - Opertaion not permitted in ....
Michael A. Peters wrote: > Morris wrote: >> Hi all >> Got a problem don't know how to get in really.. >> >> simple code: >> > >> chmod("/aaa/bbb.php", 0777); >> >> ?> >> >> and I get a warning says "Operations not permitted in ." >> >> Anyone met this before? I've done quite a lot reading on Google but >> couldn't >> get to it. >> >> THanks >> > > Many servers do not allow the apache (or php) to change file permissions. Most likely the apache user doesn't own the file. You can't CHMOD a file if you don't own it. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chmod - Opertaion not permitted in ....
Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: and I get a warning says "Operations not permitted in ." Anyone met this before? I've done quite a lot reading on Google but couldn't get to it. THanks Many servers do not allow the apache (or php) to change file permissions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] chmod - Opertaion not permitted in ....
Hi all Got a problem don't know how to get in really.. simple code: and I get a warning says "Operations not permitted in ." Anyone met this before? I've done quite a lot reading on Google but couldn't get to it. THanks
Re: [PHP] Chmod a Directory
On 10/9/07, tedd <[EMAIL PROTECTED]> wrote: > At 12:00 PM +0200 10/9/07, Samuel Vogel wrote: > >You will have to loop through the directory recursively, running > >chmod() on every file there is! > > > >Regards, > >Samy > > Isn't there a sticky bit thing (i.e., 1777) you can use to change the > files inside a directory? > > I've never done it, but I remember reading about it. > > Daniel Brown posted a magnificent post about permissions one time, > but I can't find it. Perhaps he would be so kind as to post it again? > > Cheers, > > tedd > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > Thanks, Tedd! I had to search for it, and wasn't having much luck, but GMANE has a copy of it, posted 18 May, 2007. http://article.gmane.org/gmane.comp.php.general/163539 -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chmod a Directory
At 12:00 PM +0200 10/9/07, Samuel Vogel wrote: You will have to loop through the directory recursively, running chmod() on every file there is! Regards, Samy Isn't there a sticky bit thing (i.e., 1777) you can use to change the files inside a directory? I've never done it, but I remember reading about it. Daniel Brown posted a magnificent post about permissions one time, but I can't find it. Perhaps he would be so kind as to post it again? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chmod a Directory
On 10/9/07, Stut <[EMAIL PROTECTED]> wrote: > abderrazzak nejeoui wrote: > > Please how can i chmod a directory to 0777 > > i tried chmod ($myDirectory, 0777); but nothing happens > > Check the return value. If it's false then it's failing for some > reason., most likely because the user it's running as doesn't have > permission to extend the permissions on that directory that far. > > Also make sure you read the notes here: http://php.net/chmod > > -Stut > > -- > http://stut.net/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Once again, Stut is most likely correct. Chances are the directory was created by someone other than as whom the script is being run. If you're server isn't configured to use phpSuExec, sticky bits, or a similar setup, then chances are that you created the directory as your user account (via FTP, SSH, a file manager, etc.), and are attempting to chmod() the directory as Apache's user (nobody, httpd, daemon, apache, etc.). If that's the case, your best bet is to remove the directory using the same medium with which you created it (if you can), and add the following above your chmod() line: However, another point to keep in mind is that, if you do things correctly, you should never need a directory to be 0777 (everyone can read, write, and execute), as that's a serious potential security risk. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chmod a Directory
abderrazzak nejeoui wrote: Please how can i chmod a directory to 0777 i tried chmod ($myDirectory, 0777); but nothing happens Check the return value. If it's false then it's failing for some reason., most likely because the user it's running as doesn't have permission to extend the permissions on that directory that far. Also make sure you read the notes here: http://php.net/chmod -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chmod a Directory
You will have to loop through the directory recursively, running chmod() on every file there is! Regards, Samy abderrazzak nejeoui schrieb: Please how can i chmod a directory to 0777 i tried chmod ($myDirectory, 0777); but nothing happens thanks in advence Nejeoui -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Chmod a Directory
Please how can i chmod a directory to 0777 i tried chmod ($myDirectory, 0777); but nothing happens thanks in advence Nejeoui
Re: [PHP] CHMOD a file in windows server 2003
Check out the CACLS command HTH, JC Kencana wrote: Hi all, anybody knows how to CHMOD a file to 777 or 666 or etc. in windows server 2003? thank you Regards, Kencana -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHMOD a file in windows server 2003
Kencana wrote: > Hi all, > > anybody knows how to CHMOD a file to 777 or 666 or etc. in windows server > 2003? windows server 2003 (et al) uses a completely different mechanism to the std linux way of doing things with regard to file permissions. other than opening lots of dialogs and checking lots of boxs I don't really know ;-) SingTFW didn't offer any obvious results regarding setting NTFS file permissions directly from php. maybe you can load a .NET module that has this capability?: http://php.net/manual/en/ref.dotnet.php or likewise using the COM extension to gain access to something usable? http://php.net/manual/en/ref.com.php or maybe this?: http://php.net/manual/en/ref.w32api.php or this?: http://php.net/manual/en/ref.iisfunc.php I would probably figure out what commandline functionality windows offers to do this kind of thing and then call the relevant cmd using the functions provided here: http://php.net/manual/en/ref.exec.php of course a cynic might ask what the point was of bothering with permissions on a windows system - but I'll restrain myself ;-) > > thank you > > Regards, > Kencana -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CHMOD a file in windows server 2003
Hi all, anybody knows how to CHMOD a file to 777 or 666 or etc. in windows server 2003? thank you Regards, Kencana -- View this message in context: http://www.nabble.com/CHMOD-a-file-in-windows-server-2003-tf2962953.html#a8290007 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] chmod difficulties...
Hi, I'm using the AIX or UNIX system... When I tried the ... --snip-- passthru('chmod -R a+rw ../WebHelp/* 2>&1'); --snip-- I get an error message, "Operation Is Not Permitted".. So, I tried other option... --snip-- chmod("../WebHelp/", 0755); --snip-- I get an error message, "Warning: chmod(): Not owner in <> on line 13".. Problem here is that Apache use hte account, "nobody" and is used as "other" when it come to file permission. (Not the "file owner" or "group")... The rest of the website files are in a different user account and have different ownership:group... Does anyone encountered this situation and does anyone every have a workaround to it to your knowledge?? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHMOD...
Justin Patrin wrote: In all fairness, that's not a very good solution. Using system commands makes your script not cross platform, meaning it can't work on Windows. For a better solution try writing a recursive chmod script that sets the permission, the loops through the files and calls itself on them if the input is a directory. Hmm, chmod does not work on windows anyway, so it is not cross platform either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHMOD...
In all fairness, that's not a very good solution. Using system commands makes your script not cross platform, meaning it can't work on Windows. For a better solution try writing a recursive chmod script that sets the permission, the loops through the files and calls itself on them if the input is a directory. Jay Blanchard wrote: [snip] exec("chmod 0777 /directory/*"); You still cannot set all sub directory and files within those permissions. Best to loop through and set each as needed, don't forget to cahnge them back. Yes, you can: exec("chmod -R 0777 /directory/*"); [snip] *slaps forehead* Duh me! Of course! I so rarely (nearly never) use that switch that in my haste to fire off an answer I forgot it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CHMOD...
[snip] Is there anyway to use CHMOD: chmod ("/somedir/somefile", 0755); but have it set all files, folders etc to the CHMOD setting I want? I have a folder, and within that, I wanna quickly, jsut set it all to CHMOD 777. all sub DIR's and files etc... can it be done simply? E.G. : chmod ("/somedir/%", 0755); [/snip] Danger, Danger!! [tm] Yes you can, but 'tis not a swell idea. You can exec the chmod command exec("chmod 0777 /directory/*"); You still cannot set all sub directory and files within those permissions. Best to loop through and set each as needed, don't forget to cahnge them back. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHMOD...
How about: exec("chmod -R 755 /somedir/"); [EMAIL PROTECTED] wrote: *** This Email Has Been Virus Swept *** Is there anyway to use CHMOD: chmod ("/somedir/somefile", 0755); but have it set all files, folders etc to the CHMOD setting I want? I have a folder, and within that, I wanna quickly, jsut set it all to CHMOD 777. all sub DIR's and files etc... can it be done simply? E.G. : chmod ("/somedir/%", 0755); * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** -- -- www.curvedvision.com -- This communication is confidential to the intended recipient(s). If you are not that person you are not permitted to make use of the information and you are requested to notify the sender immediately of its receipt then destroy the copy in your possession. Any views or opinions expressed are those of the originator and may not represent those of Advanced System Architectures Ltd. *** This Email Has Been Virus Checked *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHMOD...
Jay Blanchard wrote: Yes you can, but 'tis not a swell idea. You can exec the chmod command exec("chmod 0777 /directory/*"); You still cannot set all sub directory and files within those permissions. Best to loop through and set each as needed, don't forget to cahnge them back. Yes, you can: exec("chmod -R 0777 /directory/*"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHMOD...
Jay Blanchard wrote: [snip] Is there anyway to use CHMOD: chmod ("/somedir/somefile", 0755); but have it set all files, folders etc to the CHMOD setting I want? I have a folder, and within that, I wanna quickly, jsut set it all to CHMOD 777. all sub DIR's and files etc... can it be done simply? E.G. : chmod ("/somedir/%", 0755); [/snip] Danger, Danger!! [tm] Yes you can, but 'tis not a swell idea. You can exec the chmod command exec("chmod 0777 /directory/*"); Better : exec("chmod -R 0777 /directory"); You still cannot set all sub directory and files within those permissions. Best to loop through and set each as needed, don't forget to cahnge them back. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CHMOD...
[snip] > exec("chmod 0777 /directory/*"); > > You still cannot set all sub directory and files within those > permissions. Best to loop through and set each as needed, don't forget > to cahnge them back. > Yes, you can: exec("chmod -R 0777 /directory/*"); [snip] *slaps forehead* Duh me! Of course! I so rarely (nearly never) use that switch that in my haste to fire off an answer I forgot it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CHMOD...
Is there anyway to use CHMOD: chmod ("/somedir/somefile", 0755); but have it set all files, folders etc to the CHMOD setting I want? I have a folder, and within that, I wanna quickly, jsut set it all to CHMOD 777. all sub DIR's and files etc... can it be done simply? E.G. : chmod ("/somedir/%", 0755); * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
[PHP] Chmod funk
This line of code: if(!is_readable("Constants.inc")) chmod("Constants.inc", 0644); Produces this error: Warning: chmod() [function.chmod]: Operation not permitted in /home/mastersite/public_html/index.php on line 6 What I'm trying to do is determine if Constants.inc is readable. If not, I want to change its permissions. At this point, I'm not worried about if it exists or not. I'm not sure why I can't set it. The owner and group for the file are both 'mastersite', and my PHP is running as 'root' (I know, I know, not a good idea, but I'm in the testing phase right now, and if it's hacked at the moment, it's not a problem). Does anyone have a possible explanation? The file perms for Constants.inc are currently set at executable for all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] chmod - some files can be viewed, others cannot
I have a directory $DOCUMENT_ROOT/my/images, permission 0755 I have three images in my folder with the exact same permissions: 0755; same ownership, same everything. The files, viewed on my machine, are fine too. However, two cannot be seen due to permissions errors; one can be seen. All three were uploaded the exact same way too. Anyone want to solve this riddle? I am stumped as usual. Thanx Phil
Re: [PHP] chmod error?
Hello. First off, to change ownership you want "chown", not "chmod". Also, chown isn't always permitted depending on the cicrumstances of who owns the directory or the specific file to begin with. If you're web server is running as nobody it will only be able to create files in a directory owned by nobody (or world writable...but that's stupid) or modify a file that already exists and owned by nobody. If I may ask, what are you trying to change the ownership for / to? Henrik On Wednesday 10 April 2002 02:06, John Weez wrote: > Hi all...I want to change the ownership of a file that is created via > php..so i uses chmod command in my php script.. Upon execution of the > script i get an error saying command not permitted with a line number > pointing to my chmod command. > > I'm running apache as user nobody for security reasons. > > any hints as to how i can get chmod to work would be great... > > John -- -- Henrik Hudson [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] chmod error?
Hi all...I want to change the ownership of a file that is created via php..so i uses chmod command in my php script.. Upon execution of the script i get an error saying command not permitted with a line number pointing to my chmod command. I'm running apache as user nobody for security reasons. any hints as to how i can get chmod to work would be great... John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chmod trouble
Previously, Nikola Veber said: > > What chmod value gives the read-only premission to the file ? (777 is the > read-write) 0400 would be read-only and visible only to the owner 0444 would be read-only, visible to anyone 0644 would be read-only to anyone but the owner (r/w to owner). -dan -- I didn't have time to write a short letter, so I wrote a long one instead. -Mark Twain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chmod trouble
Hi ! What chmod value gives the read-only premission to the file ? (777 is the read-write) Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chmod and ps ef |grep httpd
i've been told that the files must be owned by the same person that owns the httpd. using ps ef |grep httpd, it says "grep httpd USERNAME= ENV=/home/police/.bashrc HISTSIZE=" my unix login is police. so, what does this mean as far as trying to get my chmod command to work? thanx __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chmod failed: Operation not permitted
at your unix prompt, (assuming you are running apache) enter the command "ps -ef |grep httpd" you should see the httpd (apache) process, and who owns it. Typicly this is the user "nobody". Your file needs to be owned by the user that owns the httpd process. - Jason Bell - Original Message - From: "Police Trainee" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Friday, August 31, 2001 11:50 AM Subject: Re: [PHP] chmod failed: Operation not permitted > the files are all owned by me, that is, my unix login. > --- Jason Bell <[EMAIL PROTECTED]> wrote: > > who owns the file to begin with? your account? a > > web server typically runs > > as a low access account, such as "nobody" on Unix. > > So, what is probably > > happening is that you don't have permissions to > > chmod the file. Doesn't have > > anything to do with your PHP configuration. > > > > Jason Bell > > > > - Original Message - > > From: "Police Trainee" <[EMAIL PROTECTED]> > > To: "PHP" <[EMAIL PROTECTED]> > > Sent: Friday, August 31, 2001 11:43 AM > > Subject: [PHP] chmod failed: Operation not permitted > > > > > > > can anyone help? > > > safe mode is set to "0", which i believe is "off". > > > > > > i put a chmod command in one of my scripts and got > > the > > > following error on running it: > > > > > > Warning: chmod failed: Operation not permitted in > > > /path-here/index.phtml on line 1 > > > > > > why won't chmod work? > > > > > > the chmod command i used is: > > > > 0646);write data to file that has been made > > > world-writable here; chmod("../index.phtml", > > 0644);}?> > > > > > > the full error printout is: > > > > > > Warning: chmod failed: Operation not permitted in > > > /path-here/index.phtml on line 1 > > > > > > Warning: fopen("../index.phtml","a") - Permission > > > denied in > > > /path here/index.phtml on line 1 > > > > > > Warning: Unable to find file identifier 0 in > > > /path here/index.phtml on line 2 > > > > > > Warning: chmod failed: Operation not permitted in > > > /path-here/index.phtml on line 2 > > > > > > I know the second error is because the file wasn't > > > made world-writable so it wasn't able to write to > > it, > > > i don't know what the third error is for > > > > > > __ > > > Do You Yahoo!? > > > Get email alerts & NEW webcam video instant > > messaging with Yahoo! > > Messenger > > > http://im.yahoo.com > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger > http://im.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chmod failed: Operation not permitted
Therein lies the problem. The webserver, therefore your PHP script, is probably *NOT* running with your credentials. Larry * Police Trainee <[EMAIL PROTECTED]> [010831 13:50]: > the files are all owned by me, that is, my unix login. > --- Jason Bell <[EMAIL PROTECTED]> wrote: > > who owns the file to begin with? your account? a > > web server typically runs > > as a low access account, such as "nobody" on Unix. > > So, what is probably > > happening is that you don't have permissions to > > chmod the file. Doesn't have > > anything to do with your PHP configuration. > > > > Jason Bell > > > > - Original Message - > > From: "Police Trainee" <[EMAIL PROTECTED]> > > To: "PHP" <[EMAIL PROTECTED]> > > Sent: Friday, August 31, 2001 11:43 AM > > Subject: [PHP] chmod failed: Operation not permitted > > > > > > > can anyone help? > > > safe mode is set to "0", which i believe is "off". > > > > > > i put a chmod command in one of my scripts and got > > the > > > following error on running it: > > > > > > Warning: chmod failed: Operation not permitted in > > > /path-here/index.phtml on line 1 > > > > > > why won't chmod work? > > > > > > the chmod command i used is: > > > > 0646);write data to file that has been made > > > world-writable here; chmod("../index.phtml", > > 0644);}?> > > > > > > the full error printout is: > > > > > > Warning: chmod failed: Operation not permitted in > > > /path-here/index.phtml on line 1 > > > > > > Warning: fopen("../index.phtml","a") - Permission > > > denied in > > > /path here/index.phtml on line 1 > > > > > > Warning: Unable to find file identifier 0 in > > > /path here/index.phtml on line 2 > > > > > > Warning: chmod failed: Operation not permitted in > > > /path-here/index.phtml on line 2 > > > > > > I know the second error is because the file wasn't > > > made world-writable so it wasn't able to write to > > it, > > > i don't know what the third error is for > > > > > > __ > > > Do You Yahoo!? > > > Get email alerts & NEW webcam video instant > > messaging with Yahoo! > > Messenger > > > http://im.yahoo.com > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger > http://im.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chmod failed: Operation not permitted
the files are all owned by me, that is, my unix login. --- Jason Bell <[EMAIL PROTECTED]> wrote: > who owns the file to begin with? your account? a > web server typically runs > as a low access account, such as "nobody" on Unix. > So, what is probably > happening is that you don't have permissions to > chmod the file. Doesn't have > anything to do with your PHP configuration. > > Jason Bell > > - Original Message - > From: "Police Trainee" <[EMAIL PROTECTED]> > To: "PHP" <[EMAIL PROTECTED]> > Sent: Friday, August 31, 2001 11:43 AM > Subject: [PHP] chmod failed: Operation not permitted > > > > can anyone help? > > safe mode is set to "0", which i believe is "off". > > > > i put a chmod command in one of my scripts and got > the > > following error on running it: > > > > Warning: chmod failed: Operation not permitted in > > /path-here/index.phtml on line 1 > > > > why won't chmod work? > > > > the chmod command i used is: > > 0646);write data to file that has been made > > world-writable here; chmod("../index.phtml", > 0644);}?> > > > > the full error printout is: > > > > Warning: chmod failed: Operation not permitted in > > /path-here/index.phtml on line 1 > > > > Warning: fopen("../index.phtml","a") - Permission > > denied in > > /path here/index.phtml on line 1 > > > > Warning: Unable to find file identifier 0 in > > /path here/index.phtml on line 2 > > > > Warning: chmod failed: Operation not permitted in > > /path-here/index.phtml on line 2 > > > > I know the second error is because the file wasn't > > made world-writable so it wasn't able to write to > it, > > i don't know what the third error is for > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant > messaging with Yahoo! > Messenger > > http://im.yahoo.com > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > > > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chmod failed: Operation not permitted
who owns the file to begin with? your account? a web server typically runs as a low access account, such as "nobody" on Unix. So, what is probably happening is that you don't have permissions to chmod the file. Doesn't have anything to do with your PHP configuration. Jason Bell - Original Message - From: "Police Trainee" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Friday, August 31, 2001 11:43 AM Subject: [PHP] chmod failed: Operation not permitted > can anyone help? > safe mode is set to "0", which i believe is "off". > > i put a chmod command in one of my scripts and got the > following error on running it: > > Warning: chmod failed: Operation not permitted in > /path-here/index.phtml on line 1 > > why won't chmod work? > > the chmod command i used is: 0646);write data to file that has been made > world-writable here; chmod("../index.phtml", 0644);}?> > > the full error printout is: > > Warning: chmod failed: Operation not permitted in > /path-here/index.phtml on line 1 > > Warning: fopen("../index.phtml","a") - Permission > denied in > /path here/index.phtml on line 1 > > Warning: Unable to find file identifier 0 in > /path here/index.phtml on line 2 > > Warning: chmod failed: Operation not permitted in > /path-here/index.phtml on line 2 > > I know the second error is because the file wasn't > made world-writable so it wasn't able to write to it, > i don't know what the third error is for > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger > http://im.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chmod failed: Operation not permitted
can anyone help? safe mode is set to "0", which i believe is "off". i put a chmod command in one of my scripts and got the following error on running it: Warning: chmod failed: Operation not permitted in /path-here/index.phtml on line 1 why won't chmod work? the chmod command i used is: the full error printout is: Warning: chmod failed: Operation not permitted in /path-here/index.phtml on line 1 Warning: fopen("../index.phtml","a") - Permission denied in /path here/index.phtml on line 1 Warning: Unable to find file identifier 0 in /path here/index.phtml on line 2 Warning: chmod failed: Operation not permitted in /path-here/index.phtml on line 2 I know the second error is because the file wasn't made world-writable so it wasn't able to write to it, i don't know what the third error is for __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] chmod
Chmod -R 77x test The 'x' in the above statement is the world-permissions... Execute is worth 1, Write is worth 2, Read is worth 4. If you add up the numbers for the permissions you want, you get the result, so 775 would be full access for owner and group, and read/execute for world. Hope this helps => Ben -Original Message- From: Manu Verhaegen [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 05, 2001 4:29 AM To: 'Php-General (E-mail) Subject: [PHP] chmod I have the following question : I have a directory on my ftp server and i want give access to this directory by usergroup ( the name of the group is test ) We have do the following : % vadduser user Configuration -- Username: test Password: test Fullname: test UID:35647 Groups: test Home Dir: /ftp/test % dir drwxrwxr-x c myname vkernel512 AUG 5 11:27 test I want give read,write,exectute access for this directory to the group test how can i do this? chmod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chmod
I have the following question : I have a directory on my ftp server and i want give access to this directory by usergroup ( the name of the group is test ) We have do the following : % vadduser user Configuration -- Username: test Password: test Fullname: test UID:35647 Groups: test Home Dir: /ftp/test % dir drwxrwxr-x c myname vkernel512 AUG 5 11:27 test I want give read,write,exectute access for this directory to the group test how can i do this? chmod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chmod
Hello Manu, Saturday, August 04, 2001, 11:25:16 PM, you wrote: MV> I have the following question : MV> I have a directory on my ftp server and i want give access to this directory MV> by group (the name of the group is test) MV> % ls MV> % /ftp/test MV> % chmod 070 test MV> how can i do this Use exec() or system(). With both you can run external program. e.g. system("chmod 0700 test"); I hope it helps -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chmod
I have the following question : I have a directory on my ftp server and i want give access to this directory by group (the name of the group is test) % ls % /ftp/test % chmod 070 test how can i do this Greetings, Manu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]