LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-21-2011, 04:26 AM   #1
z4Ld0
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
Question file rights


Hi,

my problem is about file rights (at least i guess it is). Php file creates an .txt file and attempts to write text by fputs function. There is no problem with creating file but php file can't write in the file which it already created. Php file's file owner is same with .txt file but group was different. So I changed php's group and also change file rights to 777 to be sure it's going to work but it didn't.

Note: chmod doesn't work for me and fopen works with "a+"

Sorry about my english.Any help is appreciated,

Thanks.
 
Old 12-21-2011, 06:03 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
1. which distro are you running
Code:
uname -a
 
cat /etc/*release*
check ownerships & perms of the dir and the file
Code:
ls -l 

# if system uses Selinux; see qn 1
ls -lZ
3. who is the php running as; presumably as the webserver user eg one of httpd/apache/www etc
 
1 members found this post helpful.
Old 12-30-2011, 05:35 AM   #3
z4Ld0
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi again,

Thank you chrism01 for reminding me who executes output file first and who attempts to write file externally and also teaching me uname -a [COLOR="Silver"]
 
  


Reply



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
File Access Rights/Windows pdr Linux - Newbie 2 06-16-2005 01:00 AM
VSFTPD file rights hiasl Linux - Networking 2 11-15-2004 11:23 AM
file rights changed? monc Linux - Networking 3 11-19-2003 09:20 PM
File/directory access rights klmn1 Linux - Software 3 05-29-2003 01:14 AM
groups and file rights tstuhr Linux - Networking 1 10-05-2001 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 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
Open Source Consulting | Domain Registration