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 03-31-2005, 01:39 PM   #1
123654
LQ Newbie
 
Registered: Mar 2005
Posts: 4

Rep: Reputation: 0
File Permissions


I was wondering..

What happens when file permissions are dr--r--r--
Because that means that no one can delete/edit/execute any files in that whole directory at all

I'm a linux newbie and still learning
And i'm a little frustrated because i can't delete this directory. Can anyone tell me how?
Please don't tell me this folder/files are stuck on my computer forever =(


This is what happened.. If it even matters:
I wanted to install java for my browser (Firefox) so I went to java.com
Downloaded jre-1_5_0_02-linux-i586.bin and followed the install directions
Seemed like everything went fine so i restarted my browser and tested it but java applets still didn't work.

So i decided to try installing the RPM package this time, maybe it would work
So i went back to java.com, and while i was downloading jre-1_5_0_02-linux-i586-rpm.bin
I tried deleting the directory where i had installed java the first time
but "Access Denied"

I tried "chmod a+rwx" but got changing permissions of (file-name): Not permitted
 
Old 03-31-2005, 02:01 PM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
You can't just "rm" a directory.

Also, regarding the permissions which are this abbbcccddd

a = identifier ( directory, link, device, etc )
b = Owner Bits
c = Group Bits
d = World Bits

For now, your basic bits are rwx ( read, write, execute ), where each letter has a value that can be associated to it. r = 4, w = 2, x = 1. To get the appropriate r, w, or x value on the file, add the numbers up. So, if you want something that has r and x permissions, that would be a total of 5, so you could do something like chmod 755 filename.sh Where 7 is all of the bits added up, so when you do an ls -l you'll see this ( or it's equivalent ):

-rwxr-xr-x filename.sh

Ok, now that we've passed through chmod and permissions on files, let's get to your question.

You can't "rm" a directory, you can with extra options, you'll find these extra options by type rm --help, for more support type, man rm. If that directory is empty you could just issue the command rmdir and that will delete it, however, that's usually more of a pain than it's worth, look in to rm more.

Likewise, so long as you own the directory, it doesn't matter what the permissions are on it, your command will override the permissions.

Last edited by Technoslave; 04-01-2005 at 08:39 AM.
 
Old 03-31-2005, 02:14 PM   #3
123654
LQ Newbie
 
Registered: Mar 2005
Posts: 4

Original Poster
Rep: Reputation: 0
[cane@localhost java]$ rm -f CHANGES
rm: cannot remove `CHANGES': Permission denied
[cane@localhost java]$


I don't get it?

I can't delete any files in the java directory with the command "RM"
And i can't right click & delete them
So how do I do it?

Last edited by 123654; 03-31-2005 at 02:26 PM.
 
Old 03-31-2005, 02:55 PM   #4
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Well, I stated that you have to own the directory in order to do it. Do you own the directory? ls -l | grep CHANGES

My guess would be you don't, so make sure you're root when you do it.
 
Old 03-31-2005, 02:56 PM   #5
123654
LQ Newbie
 
Registered: Mar 2005
Posts: 4

Original Poster
Rep: Reputation: 0
I logged in as root and i can delete the files now with "rm (file-name)"
But it's taking forever deleting each individual file

How do i delete directories, with files inside?

Last edited by 123654; 03-31-2005 at 03:16 PM.
 
Old 03-31-2005, 03:21 PM   #6
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
rm -rf CHANGE/
 
Old 03-31-2005, 03:23 PM   #7
123654
LQ Newbie
 
Registered: Mar 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks!
 
  


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 OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
CVS - file permissions and file ownership Osten Linux - Software 3 01-18-2004 04:08 PM
file permissions and file owner won't change Nadim Slackware 5 11-29-2003 06:03 PM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

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

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