LinuxQuestions.org
Help answer threads with 0 replies.
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-14-2004, 03:14 PM   #1
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Rep: Reputation: 82
force delete/remove and mass file permissions-setting


These are a force delete/remove and mass file permissions-setting information questions.

I have Redhat Linux 9.0 on a custom-built computer. Hardware is not an issue.

There are two users: Root and Individual. I have access to both

I copied a directory/folder/whatever from a CD onto Individual's desktop. It has multiple sub-folders and sub-sub-folders, so going through each sub-folder to change permissions and empty them out and then deleting them is not really an option.

When I log in as Root, I cannot see the Individual's directory, nor the desktop for the Individual.

1. What command(s) do I run while logged in as Individual (or Root, I don't care) to force a delete of the parent directory/folder and all of its sub-folders and files (the CD I copied)? Is there a particular directory on the Indivual user that I should be in (like desktop) in order to run the command?

I see reference to the rm -rf <directory name> command in various threads here, but I don't know if that is correct, or where I should be when I run it (I assume that if the folder is on the desktop, I should be in desktop and try to delete the folder associated to it.

2. What system setting changes can I make to make sure that permissions are automatically set to permit full user access when something is downloaded/installed/copied?

Thanks,

Moxieman99
 
Old 02-15-2004, 09:36 AM   #2
drzap
LQ Newbie
 
Registered: Feb 2004
Location: Norway
Distribution: slack, mandrake, suse, gentoo
Posts: 3

Rep: Reputation: 0
The desktop you see when you log into a user is a folder in the users home directory named 'Desktop'. Usually the home folder for a user is /home/user_name (aka /home/~, since ~ means username).

If you copied a dir onto the desktop it is in the folder /home/~/Desktop
So if you want to delete this folder you open a shell cd to the /home/~/Desktop folder and run 'rm -rf dir_name' you should be very carefull with the rm -rf since it deletes everything you specifys it to delete without bothering about anything, but permissions..

Whenever you copy or install something it is set to be owned to the user you installed or copied it with.. so if you copy the cd using root into the users desktop it will belong to root, and only root may change the permissions of anything not belonging to the user you are... normally you have read pemissions to the files/folders, but if you want to get the full permissions to a file you should run 'chown' which, suprisingly enough, changes the owner..

So if you want the permissions of the folder /home/~/Desktop/foo and all the subdirectorys.. run:
chown -R username: /home/~/Desktop/foo
remeber to not add an '/' at the end since you then only will change the owner for the contents.

the -R option says that you would like to change the owner of all sub dirs..
the 'username:' specifys the username the ':' stands between the username and group, but if none is specified it uses the main group of the user so you could probably have written 'chown -R username:users /dir/subdir' and it would have the same result.. don't know what group you're part of..


To change a permission you may also use the commands: chattr, chgrp and chmod.. but as long as you own the files you have full access to them..

if you didn't know you may change into superuser(root) while logged in as the indivdual user with the command 'su'
 
Old 02-15-2004, 11:43 AM   #3
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 413

Original Poster
Rep: Reputation: 82
Thank you!

Moxieman99
 
  


Reply


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
Setting initial file permissions glabiche Linux - Security 5 11-29-2005 05:37 AM
File Permissions/ Can't save or delete website files friendlyflier Linux - Security 4 08-07-2005 06:32 AM
Need help regarding setting Perl and file permissions... mrbadi Programming 1 07-30-2005 04:43 PM
Need help regarding setting Perl and file permissions... mrbadi Linux - Software 1 07-26-2005 01:03 PM
setting permissions on a file after uploading via FTP dgsr2002 Linux - Newbie 4 10-21-2004 07:15 PM


All times are GMT -5. The time now is 06:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration