You are not logged in.

#1 2014-03-31 13:41:32

lonpot
Member
Registered: 2014-03-10
Posts: 6

Unable to change home folder owner? ls -al showing root

Hello.
I seem to be unable to change the owner of my home folder?

I have tried to use the following command:
sudo chown -R myusername /home/myusername

I even tried to log in as root and do the same, and still ls -al shows root as owner..

I think i have been able to chmod the home folder though, because i can create and delete files in my users homedir.
However, this is kinda bothering me because vncserver seem to be unable to read its passwd file as its asking for a new password every time i start it.. (unless i start it with sudo, but then it reads the passwd file from /root/.vnc/passwd)

Offline

#2 2014-03-31 13:50:44

jrmrjnck
Member
From: USA
Registered: 2011-01-17
Posts: 32

Re: Unable to change home folder owner? ls -al showing root

How is it being mounted?

mount | grep <partition containing /home>

Offline

#3 2014-03-31 13:59:57

Void_Walker
Member
Registered: 2009-06-17
Posts: 57

Re: Unable to change home folder owner? ls -al showing root

Is the owner of the homefolder root with group root (root:root)? Try to change the group as well as the user with

chown -R voidwalker:wheel /home/voidwalker

ofc with your username smile

Offline

#4 2014-03-31 14:04:32

lonpot
Member
Registered: 2014-03-10
Posts: 6

Re: Unable to change home folder owner? ls -al showing root

jrmrjnck wrote:

How is it being mounted?

mount | grep <partition containing /home>

I got the msg:
/dev/sda1 on /home type fuseblk (rw,nosuid,nodev,noatime,user_id=0,group_id=0,al     low_other,blksize=4096)

It is a NTFS usb drive hooked up to my Raspberry Pi btw.

Offline

#5 2014-03-31 14:06:14

lonpot
Member
Registered: 2014-03-10
Posts: 6

Re: Unable to change home folder owner? ls -al showing root

Void_Walker wrote:

Is the owner of the homefolder root with group root (root:root)? Try to change the group as well as the user with

chown -R voidwalker:wheel /home/voidwalker

ofc with your username smile

Everything still says root root after i tried that sad

Offline

#6 2014-03-31 14:42:45

Void_Walker
Member
Registered: 2009-06-17
Posts: 57

Re: Unable to change home folder owner? ls -al showing root

lonpot wrote:
jrmrjnck wrote:

How is it being mounted?

mount | grep <partition containing /home>

I got the msg:
/dev/sda1 on /home type fuseblk (rw,nosuid,nodev,noatime,user_id=0,group_id=0,al     low_other,blksize=4096)

It is a NTFS usb drive hooked up to my Raspberry Pi btw.

I am not really sure, but userid=0 is root, and maybe t is the reason why it mounts as root:root.

https://groups.google.com/forum/#!topic … CLOdNkB3KE <- this might be the solution. To allow fuse to mount as other user.

Offline

#7 2014-03-31 15:04:55

jrmrjnck
Member
From: USA
Registered: 2011-01-17
Posts: 32

Re: Unable to change home folder owner? ls -al showing root

Yep, NTFS is the issue. It doesn't follow the same owner-permission scheme that most *nix filesystems do. There are ways to do what you want, but it's slightly more complicated and generally less flexible. Solutions are out there, but unfortunately I don't have any more information.

Offline

#8 2014-03-31 15:26:24

lonpot
Member
Registered: 2014-03-10
Posts: 6

Re: Unable to change home folder owner? ls -al showing root

Thanks for the help!

I managed to get it working by adding some options to the fstab file.
/dev/sda1       /home   ntfs-3g defaults,auto,uid=1000,gid=10,umask=077 0 2

Offline

#9 2014-03-31 16:15:01

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: Unable to change home folder owner? ls -al showing root

If you want proper permissions/acl support you'll have to create a usermapping from uid and gid to microsoft sid. If I don't want to share it with windows I create a usermapping like this:
https://www.tuxera.com/community/ntfs-3 … r-mapping/

#!/bin/sh
domain=$(sed -e "i obase=10\nibase=16" -e "s/[[:xdigit:]]\{8\}/\U&\n/g" /etc/machine-id | bc |  {
    read a 
    read b 
    read c
    echo "$a-$b-$c"
})
echo "# generic \.NTFS-3G\UserMapping"
echo "# (id generated from  /etc/machine-id)"
echo
echo "# root group"
echo ":0:S-1-5-21-$domain-512"
echo "# root user"
echo "0::S-1-5-21-$domain-500"
echo "# user group"
echo ":users:S-1-5-21-$domain-513"
echo ":100:S-1-5-21-$domain-513"
echo "# generic template"
echo "::S-1-5-21-$domain-10000"

Last edited by progandy (2014-03-31 16:16:19)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#10 2014-03-31 21:37:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Unable to change home folder owner? ls -al showing root

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

Board footer

Powered by FluxBB