You are not logged in.

#1 2007-07-23 18:16:01

coxinha
Member
From: Curitiba/Brazil
Registered: 2007-07-23
Posts: 3

Cannot chown or chgrp local folder to other user

Hi,
I'm trying to give the ownership of a directory to another ordinary user (not root) but I'm getting "operation not permitted" error message.

The folder is a local one, created by myself... only root is being able to change it...

I tryed in HPUX and it works... but in my Arch it does not...

Any idea?

Offline

#2 2007-07-23 18:17:38

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Cannot chown or chgrp local folder to other user

Only root can chown or chgrp on Linux. (This was designed to prevent users from forcing each other to exceed quota.)

Offline

#3 2007-07-23 18:42:27

coxinha
Member
From: Curitiba/Brazil
Registered: 2007-07-23
Posts: 3

Re: Cannot chown or chgrp local folder to other user

But, is it possible to change this?

Offline

#4 2007-07-23 18:54:22

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Cannot chown or chgrp local folder to other user

No, it's hard-coded into chown / chgrp. I suggest configuring sudo to allow chown if users need to do it.

Offline

#5 2007-07-23 19:18:46

coxinha
Member
From: Curitiba/Brazil
Registered: 2007-07-23
Posts: 3

Re: Cannot chown or chgrp local folder to other user

But in this case the user would be able to take ownership of any folder... I only want to give the ownership, not retrieve...
Also, isn't it possible to allow this only to specific users?

Last edited by coxinha (2007-07-23 19:26:01)

Offline

#6 2007-07-23 21:13:38

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Cannot chown or chgrp local folder to other user

sudo will allow you to only allow certain users to do it.

If you really want it to work like on HP-UX, you'll have to modify the source code to chown / chgrp, as far as I know.

Anybody else have ideas?

Offline

#7 2007-07-23 21:42:05

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Cannot chown or chgrp local folder to other user

Couldn't you just make a unique group that was allowed by the users, then they could change the group settings i.e kde in properties.

So if your user skeleton added group foo, and any user belonging to group foo can make a file belong to a group they belong to. Then modify it so all can read, write and execute as long as the share folder is above usr ~ with the right permissions I can't see why it wouldn't work.

The default being user which I presume has it so other users can't view it, Is there any reason why this wouldn't work?

For example as a user I can chgrp optical ~/foo.file and back to users.
But chown wont do it, presumably due to being able to change mal ware to root permissions.

This works as said just hope it makes sense. wink

Last edited by FeatherMonkey (2007-07-23 22:03:40)

Offline

#8 2007-07-24 08:27:26

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Cannot chown or chgrp local folder to other user

If you both are part of the same group you should be able to "chgrp <group> <folder>", it won't work if you're not part of that group though.


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

Board footer

Powered by FluxBB