Does Chown give full rights to a folder

jskfan
jskfan used Ask the Experts™
on
I have given a user Test, ownership to a folder, but that user cannot remove the folder.
ownown
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Have you tried
rm -rf testfolder?

HTH,
Dan
The owner does not have any permissions to the folder according to your screenshot.

Try this:
chmod 770 testfolder

That will give the OWNER (first 7) and the GROUP (second 7) full access and everyone else NO access.
David CarrMessaging Administrator
Commented:
chown is used to change the owner.

chmod is used to change the permissions.

try chmod 755 testfolder
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

@David Carr,  Why add read/execute permissions for everybody?

Author

Commented:
I guess even when you give  a group or a user ownership of a folder they cannot delete it, they can delete only whatever they create inside that folder.

permissions
Seth SimmonsSr. Systems Administrator

Commented:
did you just add testuser1 to testgroup1?
if so, try to log out and in again and remove that folder
@Seth Simmons has  a good point.

Can you show us the output of the following command:

id testuser1

Author

Commented:
testuser1 is member of testgroup1
pm
Seth SimmonsSr. Systems Administrator
Commented:
oh...should have noticed this before
you can't delete it because you're on the root of the file system
within testfolder you can do whatever you want as a normal user but you can't delete it or create anything because the root level is owned by root (755)

do ls -lha / and you'll see why

putty
I guess even when you give  a group or a user ownership of a folder they cannot delete it, they can delete only whatever they create inside that folder.

yes : you need write permissions on the parent folder in order to delete a file or folder and you don't even need any permissions on the file/folder you are deleting

Author

Commented:
Thank you Guys!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial