File ownership is a way to manage files of different users and share files between users of same groups. Every file in Linux is managed by a specific user and a group. The chmod command helps to define file permissions separately for user, group and others.
Questions tagged [ownership]
174 questions
39
votes
3 answers
How to change owner of folder to current user recursively?
Using sudo nautilus I created some folders and I want to get rid of root permission on them. But I have many and I want to do it to a entire directory and its containing folders.
So how to allow read/write to current user to all files and folders…
Vitor Abella
- 8,015
- 16
- 63
- 115
39
votes
6 answers
Sudo doesn't work: "/etc/sudoers is owned by uid 1000, should be 0"
When I type a sudo command into the terminal it shows the following error:
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
How do I fix this?
Rasel Khan
- 997
32
votes
4 answers
Permission denied in FTP even though I'm the owner
Okay, so I've tried my best at finding the answer to this by searching and looking through possible duplicates, but I just can't so forgive me if it's out there somewhere anyways.
My issue is as follows. I've set the owner of /var/www to…
Tjita1
- 493
24
votes
6 answers
Changing permissions for /var/www/html
I've studied this topic https://help.ubuntu.com/community/FilePermissions for a while and can't get it work for some reason.
Particularly, these lines interest me the most:
To change all the permissions of each file and folder under a specified…
Mark Alexa
- 807
19
votes
3 answers
change ownership of all files from root to user
i'm new to Ubuntu and was wondering if there is a way to remove the ownership of all files and scripts from root to user even if i have to re-install Ubuntu?
i do know about the command 'chown -v username foldername', although it doesn't work on all…
rgr
- 2,089
16
votes
1 answer
How to change file ownership when chown says "invalid user: ‘–R'"?
ubuntu64@ubuntu:/$ sudo chown –R hduser:hadoop mongodbdata
chown: invalid user: ‘–R'
When I try to change the ownership of the file, I am just getting invalid user: '-R' error.
Christopher Gaspar
- 165
- 1
- 2
- 6
15
votes
1 answer
How to change the owner of a file or folder?
Sometimes I use root account to create some file for normal user. But it is just for convenient. And I really hope the owner of this file should be the user I create this file for.
How can I change the file owner? (GUI tools are better)
pah8J
- 351
13
votes
2 answers
Root Owns Home Directory, chown does not work
I am running Ubuntu 12.04 and having various problems. I have traced it back to the fact that my user's home directory (/home/user) is owned by root.
The /home directory is actually mounted on another drive, but I can see that in fstab I am…
DJElbow
- 281
- 1
- 3
- 8
11
votes
2 answers
Undeletable directory in lost+found
How can I delete this directory? I did fsck and it has found some garbage, I looked through these files and there wasn't something important. So I've tried to delete the contents of /lost+found and everything has gone except this strange directory.…
Grief
- 483
11
votes
3 answers
Does root ownership and exclusive access imply encryption?
If I have a file with permissions and ownership like:
-rw------- 1 root root, is this file encrypted?
I am asking this because I am wondering how the file is really protected against being read as plain bytes and then reconstructed by some…
Marc Cayuela
- 340
10
votes
1 answer
After `chown -R` git is super slow
I have a massive GIT project with several GIT submodules inside. I recursively changed ownership(chown -r) from root to my user for each file in my project.
Now any git command takes a lot of time to complete and seems to use 99% CPU. What is the…
lukas.pukenis
- 225
10
votes
2 answers
Set myself as owner of /etc with chown command now getting all kinds of errors
I needed to edit a .config file (which I know for a fact is not creating these problems, just to clear that up) and it wouldn't let me save it, so I took ownership of /etc and all contents with the command chown -hR username /etc and that let me…
Raf
- 101
9
votes
2 answers
What specific bad things happen when gedit is used with sudo?
I read this answer explaining that "sometimes" root can own something at /home/$USER directory.
Can anyone give an example how to prove it. Just give a test case when something really bad happens, when I run
sudo gedit /etc/rc.local
edit file and…
Pilot6
- 92,041
7
votes
1 answer
How can I view what groups a user is in?
What are some different ways to view what groups a user is in?
JEllis23
- 71
7
votes
2 answers
Can I safely change group ownership of /var/log/auth.log?
I am the Splunk administrator working with an Ubuntu 12.04 LTS system and I want to collect events from /var/log/auth.log.
-rw-r----- 1 root adm 16534643 Jan 8 09:49 /var/log/auth.log
Splunk runs as a normal user, splunk.
$ id…
iAmJeff
- 111