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?
|
Code:
ls -l /target/directory |
To check directory permissions, run a command like:
Quote:
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. |
Quote:
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. |
Thank you. That was helpful. So, now how do I give this particular program permission to write to the directory?
|
Quote:
|
Quote:
The simple answer is with chmod, such as Code:
chmod u+w /directory What is the program What directory is it trying to write to What is the output of "ls -ld" on that directory |
Quote:
|
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. |
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? ....
|
Exact message is "! unable to write to file system. Check directory permissions." when the executable is run.
|
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? |
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.
|
Complete path to executable is "/usr/local/openfitness
|
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. |
Yes, the link you posted is the same one. What is a bash script? I appreciate all of the help you guys are giving me. I was trying to find a replacement for Fitness Assistant which is a M$ program.
|
Working at the cmd line, you need to understand how it works ; try this tutorial http://rute.2038bug.com/index.html.gz.
Note that when you type into a cli, you are talking to a 'shell'; there are many types of shell, but on Linux the usual default is 'bash'. (bash is basically a programming lang) Check by running Code:
echo $SHELL A shell (bash) script is simply taking a sequence of shell cmds and putting them into a file, so that you can then invoke the file in one cmd, instead of running each cmd separately by hand. See the tutorial linked above. If it helps, think of it as the equiv of DOS .bat files, except bash is much more powerful. More bash links http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ HTH PS a a good searchable site for Linux cmds http://linux.die.net/man/ |
maybe the user you logined has no write permission of the directory.
|
In your post #13, you refer to files downloaded, files plural. The site I linked to which you indicate is the same on had only one file and that was a bash script. In your post #14, you indicate this file is in /usr/local/ and is named openfitness. When I downloaded it, I got the single file below. Is this what you have?
Quote:
At the root prompt type: cd /usr/local/ Next as root type: chmod 755 openfitness_unix_1_0_0.sh - or whatever the actual name of the file is. This will make it executable for all. You could also move it to your /home/user directory. |
Yes ,that is the downloaded file. But when I ran the file for installation, that's when it installed to those directories.
|
Yancek, that's not the problem.I have already made the file executable and have successfully installed it to my hard drive. When I start the program,that's when it shows me the warnings that I have previously described
|
Quote:
How do you start the program? Clicking an icon, running a script in a terminal? as a user? as root? |
All times are GMT -5. The time now is 06:00 AM. |