LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-27-2013, 11:12 AM   #1
omegazafer
LQ Newbie
 
Registered: Jun 2013
Posts: 8

Rep: Reputation: Disabled
How can any user remove a file created by other user with all permissions(777)?


I am new on Linux using ubuntu 12.04. I created three users user1, user2, user3 in same computer.
User1 created a file in its home/general with permissions rwxrwxrwx(everyboy have all permissions). I changed the user from user1 to user2 in user1 area. I want to use delete the file created by user1 in user1/home by using user2. Briefly user2 removes user1's file but I am getting warning of there is no permission.
I will be really appreciated if enligted me.
 
Old 06-27-2013, 12:37 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,511

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Removing (or creating) a file is an operation on the directory. You would need to give user2 write permission in the directory (and that might well be more permission than you wish to give).
 
1 members found this post helpful.
Old 06-27-2013, 12:41 PM   #3
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,026

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Hi there,

Quote:
Originally Posted by omegazafer View Post
I created three users user1, user2, user3 in same computer.
User1 created a file in its home/general with permissions rwxrwxrwx(everyboy have all permissions). I changed the user from user1 to user2 in user1 area. I want to use delete the file created by user1 in user1/home by using user2. Briefly user2 removes user1's file but I am getting warning of there is no permission.
deleting a file involves a write access to the directory containing that file. So, to delete a file, you need to have write permission to the directory containing it.

Btw, I don't think your approach isn't a good one. Okay, it's no problem to share directories with other users. But being that generous about "everybody's" permission can be dangerous.
If two or more users work together on a project, I'd rather create a new group and put these users into it. Then, assign the shared directory to that group, and grant the group full access to the directory and the files in it.

[X] Doc CPU
 
1 members found this post helpful.
Old 06-27-2013, 02:40 PM   #4
litzel
Member
 
Registered: May 2013
Location: Athens, Greece
Distribution: Xubuntu 12.04, Linux Mint 13
Posts: 80

Rep: Reputation: 5
Hi, have you tried to
Code:
sudo rm
the file you want to remove?

Last edited by litzel; 06-28-2013 at 02:30 AM.
 
1 members found this post helpful.
Old 06-27-2013, 03:38 PM   #5
omegazafer
LQ Newbie
 
Registered: Jun 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you so much for your answers.
I overlooked the important point I had to give permission to holding directory.
 
Old 06-28-2013, 02:31 AM   #6
litzel
Member
 
Registered: May 2013
Location: Athens, Greece
Distribution: Xubuntu 12.04, Linux Mint 13
Posts: 80

Rep: Reputation: 5
You 're welcome!!
 
  


Reply


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
changing home directory permission in user management after user created in suse(KDE) hamedhsn Linux - Security 4 04-06-2011 09:18 PM
[SOLVED] Mint8 Helena LiveCD on USB Stick - Always logs into Mint user, not newly created user rrrssssss Linux Mint 3 04-20-2010 02:14 PM
Created user in Webmin - how to lock that user in specified directory? guest Linux - Security 1 04-18-2009 07:21 PM
Running an executable file from a user created interface krisykc Linux - General 3 03-15-2007 01:54 PM
File write permissions of 777 and 755 wissyweb Linux - Security 2 01-24-2006 08:12 AM


All times are GMT -5. The time now is 11:14 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration