LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-29-2012, 12:06 PM   #1
gubby
LQ Newbie
 
Registered: Feb 2012
Location: Michigan, USA
Distribution: Fedora
Posts: 12

Rep: Reputation: Disabled
Directory permissions


A really newbie question I'm sure,but I'll ask anyhow. I have downloaded and installed a program that wants to create a database and put it on the file system. Linux says that it can not be created and then says to check directory permissions. How do I do that?
 
Old 03-29-2012, 12:16 PM   #2
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Code:
ls -l /target/directory
http://en.wikipedia.org/wiki/Chmod this wikipedia is on the command to change permissions, but summarizes what the output you will get from the ls -l command is.

Last edited by Sydney; 03-29-2012 at 12:17 PM. Reason: grammar ugh
 
Old 03-29-2012, 12:21 PM   #3
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
To check directory permissions, run a command like:

Quote:
ls -dl /var
drwxr-xr-x 18 root root 4096 Mar 28 10:20 /var/
The first line is the command I entered, finding the permissions on a directory /var/

The second line is the response. The d indicates it is a directory.

The next 9 digits are read as Read/Write/Execute for owner/group/other. ) left to right.

This is the 'ls' ( list command ). The d specifies it is a directory, the l asks for the long output, with more details.

That is it. Just change the directory path to the one you need to know about.
 
Old 03-29-2012, 12:26 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by Sydney View Post
Code:
ls -l /target/directory
ls -l <directory> lists the files in the directory - not the directory itself. ls -ld restricts the listing to the directory itself.

One of the files in the directory on UNIX/Linux is "." which is a link back to the directory so you can determine the permissions of the directory by looking at the . file. (.. is also there and is a link to the directory above the current one a/k/a parent directory). However for a large directory the . and .. would scroll off the screen rapidly so it is better to use ls -ld when you just want to know the directory.
 
Old 03-29-2012, 12:35 PM   #5
gubby
LQ Newbie
 
Registered: Feb 2012
Location: Michigan, USA
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you. That was helpful. So, now how do I give this particular program permission to write to the directory?
 
Old 03-29-2012, 12:35 PM   #6
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Quote:
Originally Posted by MensaWater View Post
ls -l <directory> lists the files in the directory - not the directory itself. ls -ld restricts the listing to the directory itself.

One of the files in the directory on UNIX/Linux is "." which is a link back to the directory so you can determine the permissions of the directory by looking at the . file. (.. is also there and is a link to the directory above the current one a/k/a parent directory). However for a large directory the . and .. would scroll off the screen rapidly so it is better to use ls -ld when you just want to know the directory.
I have to mention you will not see the dot notations MensaWater is talking about unless you use the -a switch with ls.

Last edited by Sydney; 03-29-2012 at 12:36 PM. Reason: misspelled name MensaWater
 
Old 03-29-2012, 12:44 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by gubby View Post
Thank you. That was helpful. So, now how do I give this particular program permission to write to the directory?
It depends on the directory it needs write permission for, and what user you're trying to install it using.

The simple answer is with chmod, such as
Code:
chmod u+w /directory
But if your user isn't the owner of this directory, that will probably fail as well, because you don't have the permission to modify the permissions on the directory. In that case, you would need to run the chmod as root, or just simply install your program as root. We need more details before we can say which is the best choice for you.

What is the program
What directory is it trying to write to
What is the output of "ls -ld" on that directory

Last edited by suicidaleggroll; 03-29-2012 at 12:51 PM.
 
Old 03-29-2012, 12:46 PM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by Sydney View Post
I have to mention you will not see the dot notations MensaWater is talking about unless you use the -a switch with ls.
touche
 
Old 03-29-2012, 12:50 PM   #9
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The program you downloaded ideally has some sort of documentation.

Check for files that start with the name README. Those usually give you a good idea of what you need to do and most people include them with things they give to others to download.

Telling us exactly what you downloaded and providing the exact message you got would be helpful.

Since you're a newbie one major warning: Do NOT change the permission of everything to rwxrwxrwx (read/write/execute or 777) for everything. Many a newbie has broken their systems doing that. Many things break because they should have certain permissions only and this stops dumb hackers who try to open permissions globally that way.
 
Old 03-29-2012, 01:06 PM   #10
gubby
LQ Newbie
 
Registered: Feb 2012
Location: Michigan, USA
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: Disabled
Ok,Ill explain everything I did. BTW I'm not that great with computers and have just went to ONLY Linux for 2 weeks now, trying to learn all this. I down loaded the program and then in a terminal as root did "chmod +x "file",because it said to in the install instructions...hmm...then I ran the auto installer. It installed to /usr/local/"the file folder". In that file is a execute file. I run that and the file tries to create its data base,as it loads the program, but can't because of the directory permissions. So...which directory do I change? ....
 
Old 03-29-2012, 01:10 PM   #11
gubby
LQ Newbie
 
Registered: Feb 2012
Location: Michigan, USA
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: Disabled
Exact message is "! unable to write to file system. Check directory permissions." when the executable is run.
 
Old 03-29-2012, 01:31 PM   #12
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You're still being vague.

The "software" and "the file folder" don't really tell us anything. If you're unwilling to share details we are going to have difficulty assisting you.

WHAT is the name of the software you downloaded?
WHERE did you download it from?

You have a document that told you to set execute bit (chmod +x). What else is in that document? Is there a soft copy?
 
Old 03-29-2012, 02:08 PM   #13
gubby
LQ Newbie
 
Registered: Feb 2012
Location: Michigan, USA
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: Disabled
Sorry, not trying to be vague,just not sure what to tell you. The software is called openfitness,downloaded at their website, sorry don't have url handy. Downloaded from the Linux dist download area, that's where the instructions are. Looked around the files that downloaded,did not find a readme or any other install ins.
 
Old 03-29-2012, 02:11 PM   #14
gubby
LQ Newbie
 
Registered: Feb 2012
Location: Michigan, USA
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: Disabled
Complete path to executable is "/usr/local/openfitness
 
Old 03-29-2012, 04:26 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
I googled openfitness and came up with a few sites, is the site below the one you are referring to:

http://www.workoutware.com/openfitness/download.shtml

I found several sites with similar software. Without your giving the URL, there's not much more than guessing anyone here can do. The above site seems to do what you indicate but it is simply one very large (6.5MB) bash script.
 
  


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 permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
Directory permissions focus1 Linux - Security 4 06-06-2006 04:09 PM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 12:52 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM
directory permissions odious1 Linux - Networking 3 07-15-2003 02:31 PM

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

All times are GMT -5. The time now is 12:09 AM.

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