Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 02-01-2004, 08:51 AM   #1
LQ Newbie
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Keep getting "Permission Denied" when trying to write files

I just installed Debian and am brand new to this. When I go into vi editir and create a file, I cannot save it. I get "permissions denied". I understand that there are read-write privledges assigned for each directory, but:

1) I don't know how to assign them or check them

2) I thought that I would be able to at least write to my home directory, but I cannot write to any directory
Old 02-01-2004, 10:25 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
ls -la will show you a list off all the files and there permissions.

It'll look like this:
-rw-r--r-- 1 root root 488 Jan 22 09:24 temp

Now I am going to break this down for you, first with permissions.
There are 10 bits to the permissions, first bit (- in my example) is the suid bit. If this is set (it'll say s instead of -) then when a user with permission to the file uses it they use it as if they are the owner. The next three bits (rw-) in the example are the rwx permissions for the files owner. The next three after that (r--) in the example are the rwx for members of the group the file belongs to. The last three (r--) in the example are the rwx for all other users. So in this case temp can be read and written by the owner, read by any member of the group, and read by all other users. We will ignore the 1 for now, the first label, root, is the owner of the file. The second, also root, is the group the file is in. The next number is the size in bytes. After that is the date it was last written to. And the last thing is the name of the file.

To change permissions you must be the owner of the file, or have privileges to it (root has privileges to all files). chmod is the command to change permissions, type man chmod to see how that works.
Old 02-01-2004, 10:29 AM   #3
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Oh ya, and about that first 1, that is the number of items that link to the file. Linux file systems (ext2, ext3, reiserfs, ect.) support linking at the file system level. See the man page on ln to understand more about linking.


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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Submount, "permission denied" when writing to floppy as normal user DaneM Linux - Software 5 02-22-2006 02:05 PM
Only root hears sounds, alsa gives "permission denied" Baix Linux - General 4 07-02-2005 01:30 PM
"permission denied" error when cron job executes jillu Linux - Newbie 11 11-02-2004 01:19 PM
"permission denied" when I try to send raw data to the sound device. Travis86 Linux - Hardware 2 10-29-2003 09:08 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:08 PM.

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