Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Just a Basic question... 2

Status
Not open for further replies.

HoMyGod

Programmer
Jul 17, 2000
59
CH
Hi,

how can I change the owner of a folder. For exemple, I write ls -l and I see :

drwxr-xr-x 3 root root 4096 Dec 20 2000 Conf
drwxr-xr-x 2 root root 4096 Dec 20 2000 Last
drwxr-xr-x 2 myslf myslf 4096 Dec 20 2000 myConf

how can I change root into myslf everywhere (root has more privileges, but I can access the machine as root)

Thank you
H.
 
make sure that you are the root user and then type the following:

chown HoMyGod.users Conf

This will change the owner to HoMyGod and the group owner to users.

Hope this helps Mise Le Meas,

Mighty :)
 
Also, if you want to change the owner of the files within the directory (recursive)

chown -R user.group directory

ie:
chown -R john.admins folder

-john
 
Dear Ohmygod,
Permissions in Linux make use of binary values.
eg. drwxrwxrwx
The first letter d shows that it is a directory.
The nine bits assigned to each file for permissions define access that you and others have to your file.The first three
bits apply the owners permissions, the next three apply to the owners group and the last three apply to all others.
r is for read
w is for write
x is for execute
r is assigned the number 4
w is assigned the number 2
x is assigned the number 1
Some examples are
chmod 777 files <- rwxrwxrwx
chmod 755 files <- rwxr-xr-x
chmod 644 files <- rw-r--r--

This is how it works.
Good Luck!

Krischrist
 
Hi
Do not change everything to your name. Some systems file need to be own by root and some system files need to be only r--r--r--. if you issues chown -R / you will have to install os again.

Patel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top