The chown command shell of a Unix-like operating system (such as GNU / Linux) is used to change the owner of a particular file.
Questions tagged [chown]
128 questions
106
votes
5 answers
How to chown/chmod all files in current directory?
I am trying to change the ownership and permissions of some files (and directories) in the current directory. I tried this:
chown username:groupname .
...expecting that it would affect all the files in the current directory, but instead only…
Andrew
- 15,494
47
votes
2 answers
Allow specific user permission to read/write my folder
I have a folder /home/samantha/folder that I want to share with the user tom. He can read/write the folder. How do I do that?
chown wouldn't do it because I still want to be able to be the owner of the folder. I don't see how to do this with chmod…
Zenet
- 695
42
votes
3 answers
Creating files and directories with a certain owner (user/group) while sudoing
I need to wget something (results in a compressed file in cwd), then I have to extract it, then do some copy/move/modification stuff and perhaps finally execute an script (from the downloaded archive).
Now all these task either directly (wget,…
41
votes
4 answers
How to chmod and chown hidden files in Linux?
How do I recursively execute chmod or chown for hidden files?
sudo chmod -R 775 * does not work on hidden files.
The same thing goes for sudo chown -R user:group.
15
votes
4 answers
Why unprivileged user can't change file ownership?
From chown(2):
Only a privileged process (Linux: one with the CAP_CHOWN capability) may change the owner of a file. The owner of a file may change the group of the file to any group of which that owner is a member. A privileged process (Linux:…
Alexandru
- 355
13
votes
7 answers
chown -R exclude some directory
I want to exclude some large content directory
I'm Using it to chown Directory
chown -R admin /home/admin/web/public_html
is there anyway to exclude a subdirectory under html
Like:
chown -R admin exclude=/home/admin/web/public_html/content…
Mitra
- 231
11
votes
3 answers
Transmission-daemon not picking up on watch directory
Trying to get my transmission-daemon to pick up files from a dropbox folder, to make remote starting easier (it's a headless system).
As far as I can tell, the settings.json file is as expected, but none of the files I place in the folder get picked…
Mild Fuzz
- 743
10
votes
3 answers
How to make a file editable by two different users in different groups?
I have a folder at /home/www/, and the owner is www, which is part of the www-group. I have another user, john, part of the john group. How can I chown /home/www/ to make it writable by both www and john? Thanks
user36099
8
votes
4 answers
chown: /usr/local: Operation not permitted
How should I fix this?
Tue Oct 31 21:52:56 mona@dhcp-wifi-8021x-155-41-82-88:~$ brew update && brew upgrade && brew cleanup
Error: /usr/local is not writable. You should change the
ownership and permissions of /usr/local back to your
user account:
…
Mona Jalal
- 767
7
votes
1 answer
What is the effect of "chown nobody:nogroup"?
What is the effect of chown nobody:nogroup on a single file or directory and what is the effect on files within a directory?
user727522
- 71
6
votes
2 answers
Change default permissions for new files and folders
Every time I create a new file or folder in Linux, it is accessible for r/w by myself, not the group. I want to change my system setting such that every new file or folder will be automatically accessible by the group. Is there anyway?
Ali
- 451
- 2
- 4
- 13
6
votes
2 answers
Can't change owner (user or group) of directory which I have all rights on?
TL;DR: Why am I getting the Operation not permitted? And how can I resolve this?
I'm facing a problem which I can't resolve. I'm creating a directory as user a:group a), which I want to change to user b:group a. I don't understand why this…
Bjorn
- 131
5
votes
3 answers
Multiple Users with owner rights?
I have bought a VPS and I am busy with setting up a FTP server. This is working now, but i can give only one account owner rights. So i have made a group 'administrators' with 2 users. The problem is that i can give only one user owner rights. Now i…
Tom
5
votes
1 answer
Why can't I use my newly created user with chown?
So I am attempting to create a new user and group, and then change ownership of a directory to that new user/group. However, when I do, chown comes back with an "illegal user name" message.
Here's a simplified shell script that shows what I'm trying…
Wilco
- 711
5
votes
1 answer
How to chown large group of files based on previous owner id?
I created a new account in OS X and disposed of my old one.
I have a bunch of files that now have owner 501 that need to have ownership changed to me
[/usr/local]$ ll
total 24
drwxrwxr-x 18 root admin 612B Oct 20 11:01 ./
drwxr-xr-x@ 14 root …
macek
- 6,525