LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root help! (https://www.linuxquestions.org/questions/linux-newbie-8/root-help-488472/)

Cobra243 10-01-2006 10:30 AM

root help!
 
Hi, during an installation that i did a locked folder was created on my desktop and i can't get rid of it cause it say that needs necessary permision that i don't have. Also my external hard drive and my usb stick are found by the os(ubuntu) but i can't mount them. What is wrong? Do i have to become root? If yes how? I only know how to become root from terminal(but i don't want to use terminal all the time).

b0uncer 10-01-2006 12:14 PM

You need to use terminal to become root, unless you're using gksudo or some other graphical sudo-app, since the other way would be to do a graphical login as root, which is definitely a bad idea.

What you will want to do, anyway, is to use console and sudo (on Ubuntu the root account is locked at first; to unlock, use sudo passwd root and give root some password only you know) to alter the mount-rights; you could edit your /etc/fstab for example (the usb-stick problem) and add to the options part this:

umask=022

which lets every user use the device.

For a locked file, change it's ownership to whoever user you use, and make sure it has at least read permissions (chmod +r filename).

Cobra243 10-01-2006 02:33 PM

Can you be more detailed on how can i do this please?

dogged28 10-01-2006 03:04 PM

let's see if i can help. go to applications>accessories>terminal at the terminal type sudo sh hit enter.
cd to where the file is located and type: chmod +r the locked filename hit enter.

still as root, open type gedit hit enter. pull up the /etc/fstab file and edit umask=022 save it and exit.

that should fix your problem. i believe. if i'm wrong b0uncer please correct me.
ubuntu has no root account per se. you have to sudo for the root account and enter your password. which is generally the one you set up with your login during install. hope this helps.

Cobra243 10-02-2006 07:14 AM

Yea that helped a little, but not entirly. With chmod +r or chmod o+rwx i could unlock the folder but then the subfolders locked and now i have to unlock every one of them manually. When i unlock the folder the subfoldes were locked but the files not. I could delete the files. So, is there any command that could unlock the folder and everything inside it?:confused:

ethics 10-02-2006 07:21 AM

What exactly is the foldeR? if it's owned by root it may have some sort of importance... i wouldn't go removing it without knowing what it is...

if you wanted to delete the folder et all you could do
Code:

sudo rm -rvi ~/Desktop/<folder>/

Cobra243 10-02-2006 10:17 AM

It tells that, rm: descend into directory and here we go again. I think there is command something like sudo rmdir --ignore.. that removes a folder ignoring if it is not empty. Does anybody know that command? Or can you point me where the mistake is (rm: descend into directory)?

pete1234 10-02-2006 11:12 AM

rm -r From man rm:

-r, -R, --recursive
remove the contents of directories recursively

Cobra243 10-03-2006 07:56 AM

Finally after so many hours of strugling this actually worked!! Thanks so much!!:)


All times are GMT -5. The time now is 02:47 AM.