Re: Could not save the file /var/www/html/rite.php. [message #170471 is a reply to message #170455] |
Tue, 02 November 2010 04:55 |
Denis McMahon
Messages: 634 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 01/11/10 22:19, kiran kumar wrote:
> hi i installed php in fedora 13
>
> and the problem is i saved the files in /var/www/html
>
> if i log in as a root i use vi editor and save the files no problem
>
> but i logged in as a normal user using the ge editor but i getting the
> error
>
> Could not save the file /var/www/html/rite.php.
>
> You do not have the permissions necessary to save the file. Please
> check that you typed the location correctly and try again.
>
> please can u tell the reason
>
> i log in as a root user in terminal editing the vi file and saved a
> php file in /var/www/html it does not got any error !
>
> but in normal cgi mode i edited in ge editor i cannot save in /var./
> www/html
>
> whats behind the reason ?
Linux file permissions.
To create a new file in the directories, you need the correct
permissions on the directory files.
To edit an existing data file, you need the correct permissions on the
directory and the existing data file.
To read a file from the directories, the web server needs the correct
permissions on the directory files and the data files.
You can change file and directory owners with chown, and you can change
file and directory permissions with chmod. However, determining the most
appropriate settings and use of these commands for your specific
instance that will allow you to edit the files and allow the webserver
to function is outside the scope of a php group.
Note that if you want your php scripts to write other files using fopen
/ fwrite / fclose etc, that will also be affected by the permissions and
ownerships of the files and directories involved.
Rgds
Denis McMahon
|
|
|