Problem with files/dirs deletion | Unix Linux Forums | Debian

  Go Back    


Debian Debian GNU/Linux is a free distribution of the GNU/Linux operating system.

Problem with files/dirs deletion

Debian


Tags
permissions

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-26-2013
pentago pentago is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 26 August 2014, 3:32 PM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Problem with files/dirs deletion

Hi,

The other day i installed a PHP based CMS (modx) on my shell account and noticed that i couldn't delete any of files/dirs it created after.

Also, i noticed that all that stuff is owned by username-www instead of username.

I tried chown, chmod and using a PHP script to do the same wti those files but to no avail. All i get is:
rm: cannot remove `somedir': Permission denied

Environment is somewhat restrictive so i don't have access to root.

Could someone land a helping hand?
Sponsored Links
    #2  
Old 02-26-2013
Don Cragun's Avatar
Don Cragun Don Cragun is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 24 October 2014, 5:10 AM EDT
Location: San Jose, CA, USA
Posts: 4,898
Thanks: 182
Thanked 1,646 Times in 1,397 Posts
You say you don't have access to root, but when you installed this software it was able to create a new user-ID (username-www). To remove files owned by username-www, you'll need to su to username-www or to some other account (like root) that has the privileges needed to remove files owned by someone else. (Note that depending on directory permissions, it may be enough to be in a group that has write/delete permissions for the directory or directories containing the files to be removed.)
Sponsored Links
    #3  
Old 02-26-2013
pentago pentago is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 26 August 2014, 3:32 PM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Well yeah, i was told that apache/php runs with my user as a security precaution.

Maybe i din't explained it very well, im not very skilled..
Anyway, from what i understood, such behavior is common practice on shell accounts where multi user environment is in place.

I can't switch to myusername-www, it gives me authentication failure


Code:
% su pentago-www
Password:
su: Authentication failure

Could you please elabore on how do i add myself to group with proper permissions?

Thanks!
    #4  
Old 02-26-2013
Don Cragun's Avatar
Don Cragun Don Cragun is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 24 October 2014, 5:10 AM EDT
Location: San Jose, CA, USA
Posts: 4,898
Thanks: 182
Thanked 1,646 Times in 1,397 Posts
Quote:
Originally Posted by pentago View Post
Well yeah, i was told that apache/php runs with my user as a security precaution.

Maybe i din't explained it very well, im not very skilled..
Anyway, from what i understood, such behavior is common practice on shell accounts where multi user environment is in place.

I can't switch to myusername-www, it gives me authentication failure


Code:
% su pentago-www
Password:
su: Authentication failure

Could you please elabore on how do i add myself to group with proper permissions?

Thanks!
If you can't remove files created by the application you're running, it is not running with your user-ID. Go back to the administrator who installed this application for you and tell them that you can't use it because it is creating files owned by myusername-www instead of files owned by myusername. They need to either give you the passwords you need to work as myusername-www or they need to make it run as myusername instead of as myusername-www. Other than that, we won't help you break security on the system you're using.
Sponsored Links
    #5  
Old 02-27-2013
pentago pentago is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 26 August 2014, 3:32 PM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
You obviously don't have idea on how shell accounts work and that Apache can be set to run as user-www as a safety measure sir. Why the dramma? Breaking security of the system?

Please..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWK help print dirs with files in it elcounto Shell Programming and Scripting 1 09-08-2011 04:20 PM
sort retrieved data files in different dirs leafei Shell Programming and Scripting 4 04-10-2011 10:12 PM
Have absolute path for files in different dirs canduc17 Shell Programming and Scripting 5 06-23-2010 12:57 PM
script find files in two dirs HELP fierusbentus Shell Programming and Scripting 2 03-03-2009 07:27 AM
I need to ls all files in 4-6 deep dirs gforty UNIX for Dummies Questions & Answers 4 09-18-2003 05:18 PM



All times are GMT -4. The time now is 10:40 AM.