This is a discussion on Permissions on created files within the Apache Web Server forums, part of the Web Server and Related Forums category; Server: RH 9 Apache 2.0 PHP When i create a file thru PHP with something like: $fp = fopen ("/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Server: RH 9
Apache 2.0 PHP When i create a file thru PHP with something like: $fp = fopen ("/tmp/file", 'a+') permissions are -rw-r--r-- 1 apache apache. How do i change the default permissions or better how to specify permissions at file creation ? Regards, |
|
|||
|
Sorry Confidential <sorry_confidential@hotmail.com> wrote:
> How do i change the default permissions or better how to specify permissions > at file creation ? Those permissions are correct for the file to be retrived later by Apache itself. Anyway, setting umask for ther user will fix the problem. Davide -- | A fool and his money are soon using Windows. | | | | | |
|
|||
|
umask will allow me to create a file with different permissions fine.
but i still cannot achieve what i want. Thru a web page a "lock" file is created. Thru a scheduled process (not root nor apache) i need to delete the log file Doing the rm i get Operation not permitted. I added my user to the apache group to no avail, i still cannot delete the "lock" file Any ideas ? Regards, "Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message news:bu1i2q$c8pqu$1@ID-18487.news.uni-berlin.de... > Sorry Confidential <sorry_confidential@hotmail.com> wrote: > > How do i change the default permissions or better how to specify permissions > > at file creation ? > > Those permissions are correct for the file to be retrived later > by Apache itself. Anyway, setting umask for ther user will fix > the problem. > Davide > > -- > | A fool and his money are soon using Windows. > | > | > | > | > | |
|
|||
|
Sorry Confidential <sorry_confidential@hotmail.com> wrote:
> Thru a scheduled process (not root nor apache) i need to delete the log filE You need to run the process with enough permission to delete the files, note: you can delete a file no matter what the permission on the file are if you can WRITE in the directory the file is in. So it doesn't matter the file in itself, but the directory. Davide -- | Linux - It is now safe to turn on your computer. -- From a | Slashdot.org post |
|
|||
|
My temporary files are created in /tmp (since this is a 'special' directory,
i'll change the logic to create temp files in another location where both users (Apache and my cron user) have write access. Regards, "Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message news:bu2nbr$bqqqd$3@ID-18487.news.uni-berlin.de... > Sorry Confidential <sorry_confidential@hotmail.com> wrote: > > Thru a scheduled process (not root nor apache) i need to delete the log filE > > You need to run the process with enough permission to delete the > files, note: you can delete a file no matter what the permission on > the file are if you can WRITE in the directory the file is in. So > it doesn't matter the file in itself, but the directory. > > Davide > > -- > | Linux - It is now safe to turn on your computer. -- From a > | Slashdot.org post |