Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Home Folder Keeps changing ownership to root
Home Folder Keeps changing ownership to root
Hi,
Am a newb to Debian so please be patient. For some reason all the directories in my user home folder /home/williamk keep changing ownership to root:root. This creates problems, especially since I have some network shares mounted in /home/williamk/mnt . I can chown -R my home folder back to williamk, but if I switch user to root to do a root function the ownership changes back to root. My user account williamk is in the sudo user group. Is this normal behavior in Debian?
Am a newb to Debian so please be patient. For some reason all the directories in my user home folder /home/williamk keep changing ownership to root:root. This creates problems, especially since I have some network shares mounted in /home/williamk/mnt . I can chown -R my home folder back to williamk, but if I switch user to root to do a root function the ownership changes back to root. My user account williamk is in the sudo user group. Is this normal behavior in Debian?
Re: Home Folder Keeps changing ownership to root
This is not normal behaviour. Nor is using sudo, but that's your choice. Nor is it relevant. What is relevant, and what you haven't mentioned, is the "root function" you perform.
So now some question:
1. What version of Debian are you using?
2. Does the /home/williamk folder change to root, or just its contents?
3. What is the "root function" you mentioned?
So now some question:
1. What version of Debian are you using?
2. Does the /home/williamk folder change to root, or just its contents?
3. What is the "root function" you mentioned?
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: Home Folder Keeps changing ownership to root
Hi,
1. Using Debian 8.8 with Cinnamon Desktop.
2. The williamk home folder itself shows williamk:williamk for owner. Just the contents show all root:root
3. This is a new install. When trying to install some packages I was getting failed messages unless I switched to root. Then they installed. Also to edit /etc/fstab to mount network drives, I had to be root. I figured that was normal.
1. Using Debian 8.8 with Cinnamon Desktop.
2. The williamk home folder itself shows williamk:williamk for owner. Just the contents show all root:root
3. This is a new install. When trying to install some packages I was getting failed messages unless I switched to root. Then they installed. Also to edit /etc/fstab to mount network drives, I had to be root. I figured that was normal.
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 71 times
Re: Home Folder Keeps changing ownership to root
You should be able to use sudo to perform package installation or edit a system file if that's your choice--you should be able to do it as root, also. This raises the question--did you set up sudo during the install, or later?
MX Linux packager and developer
Re: Home Folder Keeps changing ownership to root
I set up sudo after install with:
apt-get install sudo
usermod -a -G sudo williamk
Did I do it wrong? I
apt-get install sudo
usermod -a -G sudo williamk
Did I do it wrong? I
Re: Home Folder Keeps changing ownership to root
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: Home Folder Keeps changing ownership to root
What happens if you change to root with su, and then run a command? Or does it only happen with sudo?
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: Home Folder Keeps changing ownership to root
Hmmm, tried running commands with both sudo and as root with su. Now it is maintaining the correct ownership. I will try and stay out of root and just use sudo if need be. Will play with it some more and see if I can figure out what if anything is triggering the change of ownership.
Re: Home Folder Keeps changing ownership to root
What does your /etc/fstab have for /home ? Mine says
The above is on Stretch. Earlier versions had different instructions. Never-the-less, fstab instructions take precedence at boot.
Code: Select all
UUID=eef39e40-bc0a-4edf-ab18-76a7e316a50e /home ext4 defaults 0 2
Re: Home Folder Keeps changing ownership to root
let me guess: you logged into your GUI wih root, instead of performing sysadmin stuff in the terminal?williamk wrote:I was getting failed messages unless I switched to root.
Re: Home Folder Keeps changing ownership to root
Not sure what I did to be honest. But have not had the problem since.