Operating System - Linux
1832645 Members
3109 Online
110043 Solutions
New Discussion

Re: How to set file permissions?

 
SOLVED
Go to solution
debian111
Regular Advisor

How to set file permissions?

Hi,
how to change files below to belong to root
I mean asteerisk asterisk --->>

to be root toot

My distribution is Debian Sarge

Thank you

drwxr-xr-x 6 asterisk asterisk 4096 2005-10-20 08:13 admin
-rw-r--r-- 1 root root 3397 2005-10-20 07:42 amp.png
lrwxrwxrwx 1 root root 24 2005-10-19 09:27 analog -> /usr/share/analog/images
drwxr-xr-x 2 root root 4096 2005-10-19 09:27 apache2-default
drwxr-x--- 2 asterisk asterisk 4096 2005-10-19 14:24 _asterisk
-rwxr-xr-x 1 root root 614 2005-10-20 07:42 index.html
-rwxr-xr-x 1 root root 4129 2005-10-20 07:42 mainstyle.css
drwxr-xr-x 2 asterisk asterisk 4096 2005-10-21 08:47 panel
drwxr-xr-x 2 root root 4096 2005-10-20 10:30 proba
drwxr-xr-x 6 asterisk asterisk 4096 2005-10-19 14:24 recordings
3 REPLIES 3
Claudio Cilloni
Honored Contributor
Solution

Re: How to set file permissions?

# chown root:root admin _asterisk panel mainstyle.css recordings

if you need to recursive change the owner inside the directories:

# chown -R ... same as before ...
Ivan Ferreira
Honored Contributor

Re: How to set file permissions?

You can use a more selective method, like this:

find . -user asterisk -exec chown root.root {} \;


This command will find all files in the current directory and below that belongs to asterisk and replace the owner to root.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
debian111
Regular Advisor

Re: How to set file permissions?

Thank you.