You are not logged in.

#1 2007-11-21 21:27:38

chaosgeisterchen
Member
From: Kefermarkt, Upper Austria
Registered: 2006-11-20
Posts: 550

chown not permitted - even for root?

Good evening,

I'm running into one weird problem at the moment. I want to change ownership of my users' home directory, but if I execute the following as root, bash complains that the operation is not permitted - even to root, which tries to change ownership.

chown $username /home/$username

What can possibly be the reason for this to happen?

Thanks for answers in advance

~cg


celestary
Intel Core2Duo E6300 @ 1.86 GHz
kernel26
KDEmod current repository

Offline

#2 2007-11-21 21:34:11

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: chown not permitted - even for root?

Read-only filesystem mount?


I am a gated community.

Offline

#3 2007-11-21 21:44:32

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: chown not permitted - even for root?

What are the current permissions on that directory?  ls -ld /home/$username

Offline

#4 2007-11-21 21:50:53

chaosgeisterchen
Member
From: Kefermarkt, Upper Austria
Registered: 2006-11-20
Posts: 550

Re: chown not permitted - even for root?

I already suspect it to be. May I ask how to change it?

/dev/sda5 /home vfat defaults 0 0

Taken from /etc/fstab.

@cerebral:

drwxr-xr-x 2 root root 16384 14. Nov 19:14 /home/ishina/

Last edited by chaosgeisterchen (2007-11-21 21:52:55)


celestary
Intel Core2Duo E6300 @ 1.86 GHz
kernel26
KDEmod current repository

Offline

#5 2007-11-21 22:00:18

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: chown not permitted - even for root?

wait, vfat?  You can't change unix permissions on a vfat filesystem - it doesn't support them.  You can set the entire filesystem to be owned by one person with one set of permissions, but that's about it.

Why do you have your /home as vfat?

Offline

#6 2007-11-21 22:02:17

chaosgeisterchen
Member
From: Kefermarkt, Upper Austria
Registered: 2006-11-20
Posts: 550

Re: chown not permitted - even for root?

It's my shared partition with my dual-boot windows system, and as I store my data there, I automagically used it as /home. Bad news for me, I assume?

Or should I let my user own the whole filesystem?


celestary
Intel Core2Duo E6300 @ 1.86 GHz
kernel26
KDEmod current repository

Offline

#7 2007-11-22 03:37:32

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: chown not permitted - even for root?

That's a decision you'll have to make on your own.  I have /home as ext3 and use ext2ifs (or is it ext2fsd?  I can't recall) in windows to access it.

Offline

#8 2007-11-22 04:00:54

denisfalqueto
Member
From: ES, Brazil
Registered: 2006-03-24
Posts: 197

Re: chown not permitted - even for root?

Hi, this is a little bad hacking, but you can assign a user and group owner in /etc/fstab directly. Here is how I mount one of my windows partition:

/dev/hda2       /mnt/windows_d  vfat    iocharset=utf8,codepage=850,umask=0000,dmask=0000,uid=0002,gid=disk,users,auto   0       0

uid can be set to an user name too, if you so desire, just as gid was set. You can also configure a charset and codepage for that you can see files with higher than 127 ASCII codes in the names. Note that setting umask and dmask as I did is unsafe, because just everybody can see everything. But I don't put any important things on these partitions, so I don't mind here. You are advised to be more cautious if you are willing to use it as your home partition.

And another caveat: all your home dir will be owned by one user and group and will have the same file permissions.

Of course, if you can recreate your home in a proper file system it would be better.


Satisfied users don't rant, so you'll never know how many of us there are.

Offline

Board footer

Powered by FluxBB