You are here: Re: Can't chown() "my" files... « PHP Programming Language « IT news, forums, messages
Re: Can't chown() "my" files...

Posted by The Natural Philosopher on 12/04/07 23:47

Joel Fireman wrote:
> On a Linux server, a web page lets users enter items to an order
> sheet. When they finish, (besides the mysql db updates) the order data
> is emailed to the user as confirmation, a copy is emailed to the
> fulfillment people, and two files are written for pickup by a third
> party, in the third party's directory.
>
> Because the files are owned by apache, the third party cannot delete
> them, even when they are chmod'ed to 777. I tried to chown() the files
> to the third party's user, but no go.
>
That is correct behavior - only root or the owner can change file
ownerships IIRC.


And it looks like changing owners doesn't entirely work when when its
your file you are giving away..ho hum.. I remember this from somewhere..

I'll try and find out the answer..got me irritated.

Ah. You cant delete files if you don't have write access to the
*directory* the file is in..?

You need to add your user to the group the directory belongs to and set
775 permissions on the DIRECTORY as well, I think.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация