LinuxQuestions.org
Visit Jeremy's Blog.
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 02-01-2010, 01:59 AM   #1
linux2010
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
regarding : file not accessible even with chmod 777


hi

my application runs on user account and needs access to a file on which it has to work. when the file and the corresponding script is kept at certain location then the application is bale to have access to the file.

If the location of either the file or the script is changed with 777 permission to them even then the application given : "file is not accessible"

i have tried this( put these file and script) in root made folders and also in user made folders with 777 permission but results the same- " "file is not accessible"

Plz advice what may be the issues and how to resolve it.


thanks and regards
 
Old 02-01-2010, 04:13 AM   #2
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
A couple of things cross my mind;

Who does the file you are trying to access belong to, what group is it in, and what are it's permissions? Does your script fall into the bounds of those permissions?

Is there an Secure Linux context on the files stopping script access?
Is your script running chrooted and unable to access the location of the file?
 
1 members found this post helpful.
Old 02-02-2010, 12:32 AM   #3
linux2010
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Original Poster
Rep: Reputation: 0
reply

Quote:
Originally Posted by Dave_Devnull View Post
A couple of things cross my mind;

Who does the file you are trying to access belong to, what group is it in, and what are it's permissions? Does your script fall into the bounds of those permissions?

Is there an Secure Linux context on the files stopping script access?
Is your script running chrooted and unable to access the location of the file?
hi

the file is belongs to the user, the script belongs to the user. There is no grouping . The system has only root and this user.The folder containing the file and the script has chmod 777.

:" Is there an Secure Linux context on the files stopping script access?
Is your script running chrooted and unable to access the location of the file?"
How can i check these both things. This is right that the application was installed from root. but application runs from user.

plz help.

thanks
 
Old 02-02-2010, 01:13 AM   #4
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
It would be a big help if you could tell us what distro this is, a directory listing (with ls -alh) showing the directory that contains the file your script is trying to access, and the output of 'stat /the/file/concerned'.
 
Old 02-02-2010, 02:14 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,419

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
Also

ls -lZ /the/file/concerned

(lowercase L there)
 
Old 02-02-2010, 02:25 AM   #6
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
Nice touch Chris - you learn something new everyday:

' -Z, --context
print any SELinux security context of each file'

Thanks for that ;-)
 
Old 02-02-2010, 06:35 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,419

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
any time ...
I've been reading up on security for a few mths now in quiet work periods; its amazing what you learn
 
  


Reply

Tags
chmod, file


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
Why doesn't chmod -R 777 works? Snouser Linux - General 9 09-04-2008 06:39 PM
chmod 777 664 zerocool22 Linux - Server 7 06-03-2008 07:58 AM
Is it safe to chmod 777 Navaboy Slackware 4 03-24-2005 07:54 AM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 06:37 AM
chmod 777 /* ziggamon Linux - Newbie 2 09-25-2003 12:40 PM

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

All times are GMT -5. The time now is 10:47 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