LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2016, 01:36 AM   #1
Alpha90
Member
 
Registered: Jul 2012
Posts: 97

Rep: Reputation: Disabled
A question about directory permissions and rmdir GNU coreutils 8.23


When deleting a directory with rmdir should the permission check to see if a user does have permission do delete be based on the directory in question or the parent directory of the directory to be deleted?

For example in my home directory I have 3 subdirectories, user1, user2, and a newly created and empty foo and each directory has 750 permissions while home has 755 and is owned by root:

user1 is owned by user1
user2 is owned by user2
foo is owned by root

If I were to
Code:
chown user2:user2 foo
As user1 if I were to try to
Code:
rmdir foo
I would get an error message saying I do not have permission

However if I were to move foo with root to my owned directory user1 and try:
Code:
rmdir foo
foo is removed.

I can not tell if that is an error or working as normal.
 
Old 03-11-2016, 03:17 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
it works like this on my system, too.
i find it logical.
 
  


Reply

Tags
bug?, coreutils, gnu, permissions, rmdir


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] df (GNU coreutils) 6.9 declares used space not visible to ls. stf92 Linux - Software 2 11-02-2013 03:08 PM
sort (GNU coreutils) 7.4 not sorting in ascii order (asked and answered). bartonski Linux - Software 1 03-07-2010 11:48 AM
Why a directory can not be able rmdir? backpacker Linux - Software 3 11-21-2005 06:07 AM
Perl does not want rmdir an empty directory keefaz Programming 6 05-05-2005 01:59 AM
RMDIR - how to remove a non-empty directory?? jacksmash Linux - Newbie 15 11-23-2003 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration