LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2006, 05:20 PM   #1
crime
LQ Newbie
 
Registered: Apr 2006
Posts: 11

Rep: Reputation: 0
Problem when accessing to file.


Hi..

In my Fedora Core 3, I'm using Apache and PHP in it. I want to read content of the file located in /root/xxx.txt

PHP Code works well in my webhosting etc. There is no error in code.

But in this FedCor3, the page prints Permission Denied message.

Then i change permissions of the file with these commands :

chmod a+rwx xxx.txt
chown -R apache.apache xxx.txt

But still error the same.

What can i do else?

Thanks all.

Last edited by crime; 04-13-2006 at 05:48 PM.
 
Old 04-13-2006, 05:24 PM   #2
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 200

Rep: Reputation: 30
man chmod
man chown

try

chmod 755 file.txt
and also
chmod 755 directory_where_the_file_is
 
Old 04-15-2006, 03:19 AM   #3
smuzzio
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
When you want to read a file in a directory you need execute permissions in the directory where is this file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing file in kernel space manali Programming 1 02-28-2006 06:03 PM
permission of accessing file hitomi Linux - Security 14 08-01-2005 02:34 PM
File Accessing Question... JediDB Ubuntu 1 07-24-2005 01:21 AM
accessing file shadowsurfer Linux - Newbie 5 09-17-2004 03:34 PM
accessing file using ip pantera Programming 2 09-09-2004 05:43 PM


All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration