am i root??

Lex

Lex

Associate
Joined
26 Dec 2002
Posts
971
Location
NW London, United Kingdom
i want to write a file to a directory but it says i dont have permission.. How do i check if i have root previledges? I cannot remember using a different user name or password when i was installing ubunto.

can anyone tell me how i can determine whether i am *** root or not and if not how i can make myself the root without having to reformat??


thanks
 
Associate
Joined
28 Nov 2003
Posts
1,906
Location
/home
It's very unlikely that you would be root by default in most Linux distributions as being root all the time can make your system less secure.

If you want to do something in Ubuntu with root privelages you can do it in a terminal with 'sudo' or most other distributions you can switch to the root user with 'su'.

Rather than being root you might try adding your user to a group (other than root) that can write to a specific directory. To find out what groups your user belongs to type:

Code:
groups

in a terminal. To find out what permissions and associated groups a directory has, try something like:

Code:
ls -l

within the directory you want to find info about (or probably right click on a directory icon if you are using Gnome).

To add your user to a particular group you could try something like (as root):

Code:
gpasswd -a username groupname

eg:

Code:
gpasswd -a chris usb

To add my user 'chris' to the 'usb' group. In Ubuntu you would probably do it like this (as a normal user):

Code:
sudo gpasswd -a chris usb

To change a folders permissions, you could do something like this:

Code:
sudo chown chris:users SomeDirectory

so that the user 'chris' amd all users in the 'users' group have access to 'SomeDirectory'.

Of course that doesn't automicatically equal read/write permission. To change read/write & execute permissions of a file or directory you can use the 'chmod' command,

Code:
chmod --help
man chmod

(possibly prefixed with sudo) should give you a start.
 

Lex

Lex

Associate
OP
Joined
26 Dec 2002
Posts
971
Location
NW London, United Kingdom
whitecrook said:
in unbuntu you'll probably be a member of the sudoers, so just do your command but put sudo infront e .g sudo mount /dev/hda1 instead of just mount /dev/hda1

can i set the 'root' password in an effort to be able to transfer files through the GUI or the ubunto file manager without having permission problems. if so how do i set the password for the root user via the command line?

Im only asking because i dont really know the command lines of linux because they look complicated and dont have enough time to learn it.
 
Caporegime
Joined
28 Jun 2005
Posts
48,104
Location
On the hoods
Lex said:
can i set the 'root' password in an effort to be able to transfer files through the GUI or the ubunto file manager without having permission problems. if so how do i set the password for the root user via the command line?

Im only asking because i dont really know the command lines of linux because they look complicated and dont have enough time to learn it.

I'd advise against setting the root password and using root to login or to use the GUI.

Can I ask what files you're trying to transfer and to where? I imagine that is the root (pun intended) of the problem.
 

Lex

Lex

Associate
OP
Joined
26 Dec 2002
Posts
971
Location
NW London, United Kingdom
vonhelmet said:
I'd advise against setting the root password and using root to login or to use the GUI.

Can I ask what files you're trying to transfer and to where? I imagine that is the root (pun intended) of the problem.

im just using plone and it wont let me copy a folder to the /products directory so i can add a new product within plone. thats all i want to do !
 
Associate
Joined
28 Nov 2003
Posts
1,906
Location
/home
What are the permissions / groups like for the /products directory? In gnome, go to the file manager and right click on the directory and go to properties - who is the file owner & what is the file group? And what is the number view value (bottom of Properties box)?
 

Lex

Lex

Associate
OP
Joined
26 Dec 2002
Posts
971
Location
NW London, United Kingdom
.SJ said:
whoami - that'll tell you who you are

su - to switch to the root user
i can switch to root but it asks for my password and i enter that although its incorrect. why is that? do i have to set it ? do i want to ?

i just want to be able to move a file (folder) to another directory outside of my home directory.

how do i do this?
 

Lex

Lex

Associate
OP
Joined
26 Dec 2002
Posts
971
Location
NW London, United Kingdom
cb_linus said:
What are the permissions / groups like for the /products directory? In gnome, go to the file manager and right click on the directory and go to properties - who is the file owner & what is the file group? And what is the number view value (bottom of Properties box)?


the permissions are as follows: owner has read/write and execute
group: read and execute
others: read and execute.

it says 'you're not the owner so u cannot change these permissions.'
 
Back
Top Bottom