Why is it that I can delete directories as root that I cannot delete as su? dennis
* Dennis Tuchler (dtuchler@earthlink.net) [020802 14:22]:
Why is it that I can delete directories as root that I cannot delete as su?
su is not a user, it's the "substitute user" command. If you 'su -' you are root--you can verify this by typing 'echo $UID' after su'ing (0 is root, anything else is a normal user). -- -ckm
All the books I have call "su" "super user." Or, IOW, root. Do you have some documentation to the contrary? --dm At 14:25 08/02/2002 -0700, Christopher Mahmood wrote:
* Dennis Tuchler (dtuchler@earthlink.net) [020802 14:22]:
Why is it that I can delete directories as root that I cannot delete as su?
su is not a user, it's the "substitute user" command. If you 'su -' you are root--you can verify this by typing 'echo $UID' after su'ing (0 is root, anything else is a normal user).
--
-ckm
On Fri, Aug 02, 2002 at 09:09:31PM -0400, Doug McGarrett wrote:
All the books I have call "su" "super user." Or, IOW, root. Do you have some documentation to the contrary? --dm
That's probably because calling su without any argument defaults to root, but it's a misconception. Consider the following sequence: jon@a13-8:~> su Password: a13-8:/home/jon # whoami root a13-8:/home/jon # su jon jon@a13-8:~> whoami jon jon@a13-8:~> exit exit a13-8:/home/jon # whoami root a13-8:/home/jon # exit exit jon@a13-8:~> whoami jon jon@a13-8:~> Which shows that I can su from 'root' to 'me', as well as from 'me' to 'root'. Also; by the time I've su'ed from me->root->me there are three shells running: me root(me) me(root(me)) I think of it as 'Switch User'... Of course none of this is documentation as such, but 'Super User' is... well, wrong... IMHO Jon Clausen
On Saturday 03 August 2002 01:09, Doug McGarrett wrote:
All the books I have call "su" "super user." Or, IOW, root. Do you have some documentation to the contrary? --dm
Documentation? What's that? ;) Type "man su" and let's see what it says: su - run a shell with substitute user and group IDs So, this is how the author of the program thought about su: substitute user. Burn your books! <---- This is a joke Have fun, Dan. -- Binaries might die, but source code lives forever
* Doug McGarrett (dougmack@i-2000.com) [020802 18:09]:
All the books I have call "su" "super user." Or, IOW, root. Do you have some documentation to the contrary? --dm
Sure, ckm@pez: ~> whatis su su (1) - run a shell with substitute user and group IDs It's sort of like how the 's' in /sbin has come to stand for 'system' when originally it signified 'static'. -- -ckm
On Friday 02 August 2002 21:09, Doug McGarrett wrote:
All the books I have call "su" "super user." Or, IOW, root. Do you have some documentation to the contrary? --dm
Yeah, the man page!
At 14:25 08/02/2002 -0700, Christopher Mahmood wrote:
* Dennis Tuchler (dtuchler@earthlink.net) [020802 14:22]:
Why is it that I can delete directories as root that I cannot delete as su?
su is not a user, it's the "substitute user" command. If you 'su -' you are root--you can verify this by typing 'echo $UID' after su'ing (0 is root, anything else is a normal user).
--
-ckm
On Friday 02 August 2002 23:22, Dennis Tuchler wrote:
Why is it that I can delete directories as root that I cannot delete as su?
I can think of no sane reason. su will make you root in every respect, as far as I know. Do you have a specific example? //Anders
On Fri, Aug 02, 2002 at 11:26:21PM +0200, Anders Johansson wrote:
On Friday 02 August 2002 23:22, Dennis Tuchler wrote:
Why is it that I can delete directories as root that I cannot delete as su?
I can think of no sane reason. su will make you root in every respect, as far as I know. Do you have a specific example?
CMIIW, and this might be semantics, but plain 'su' while changing UID doesn't change environmet variables. Whereas 'su -l' constitutes a 'real' login with change of environment vars, pwd and whatever. So to become root in *every* respect, you'd need to: su -l No ? Jon Clausen
On 3 Aug 2002, at 0:38, Jon Clausen wrote:
On Fri, Aug 02, 2002 at 11:26:21PM +0200, Anders Johansson wrote: On Friday 02 August 2002 23:22, Dennis Tuchler wrote:
Why is it that I can delete directories as root that I cannot delete as su? I can think of no sane reason. su will make you root in every respect, as far as I know. Do you have a specific example?
CMIIW, and this might be semantics, but plain 'su' while changing UID doesn't change environmet variables. Whereas 'su -l' constitutes a 'real' login with change of environment vars, pwd and whatever.
So to become root in *every* respect, you'd need to: su -l
No ?
Perhaps the originally logged in user has an alias to delete non- empty directories, while the root user does not. What commands are being issued do remove the directories? What are the error messages when the directories fail to delete? Just a few thoughts. ~Dale ________________________________ Dale Schuster MIS Manager Lake Tahoe Horizon Casino Resort dschuster@horizoncasino.com
On Saturday 03 August 2002 00:38, Jon Clausen wrote:
CMIIW,
OK, now this is one I hadn't heard before, and it's not in any of the online dictionaries either (at least 'dict' can't find it). What's it stand for?
and this might be semantics, but plain 'su' while changing UID doesn't change environmet variables. Whereas 'su -l' constitutes a 'real' login with change of environment vars, pwd and whatever.
So to become root in *every* respect, you'd need to: su -l
No ?
No, not really. A user is defined by the User ID, not by the environment variables. As others have pointed out, it could be that the guy is trying to use an alias that isn't defined if you just 'su', in which case your solution would be right, but that should give an error along the lines of "command not found", it shouldn't say that you're not permitted. Permissions have nothing to do with env vars (yeah, ok, XAUTHORITY, but I'm not writing a book here :). I think it requires more info from the original poster before a solution can be given. //Anders
Anders Johansson wrote:
On Saturday 03 August 2002 00:38, Jon Clausen wrote:
CMIIW,
OK, now this is one I hadn't heard before, and it's not in any of the online dictionaries either (at least 'dict' can't find it). What's it stand for?
sh: ~> wtf CMIIW CMIIW: correct me if I'm wrong SH
On Friday 02 August 2002 16:26, Anders Johansson wrote:
On Friday 02 August 2002 23:22, Dennis Tuchler wrote:
Why is it that I can delete directories as root that I cannot delete as su?
I can think of no sane reason. su will make you root in every respect, as far as I know. Do you have a specific example?
//Anders I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su -- dj tuchler dtuchler@earthlink.net
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su. //Anders
On Friday 02 August 2002 21:51, Anders Johansson wrote:
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su.
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted -- dj tuchler dtuchler@earthlink.net
* Dennis J. Tuchler
On Friday 02 August 2002 21:51, Anders Johansson wrote:
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su.
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
What are the attributes of /Data ?? -- Patrick Shanahan Registered Linux User #207535 @ http://counter.li.org
On Friday 02 August 2002 22:20, SuSEnixER wrote:
* Dennis J. Tuchler
[08-02-02 22:16]: On Friday 02 August 2002 21:51, Anders Johansson wrote:
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su.
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
What are the attributes of /Data ??
/Data is a directory, owner is root -- dj tuchler dtuchler@earthlink.net
* Dennis J. Tuchler
On Friday 02 August 2002 22:20, SuSEnixER wrote:
* Dennis J. Tuchler
[08-02-02 22:16]: On Friday 02 August 2002 21:51, Anders Johansson wrote:
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su.
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
What are the attributes of /Data ??
/Data is a directory, owner is root
??: ls -la /Data -- Patrick Shanahan Registered Linux User #207535 @ http://counter.li.org
* Dennis J. Tuchler
On Friday 02 August 2002 22:20, SuSEnixER wrote:
* Dennis J. Tuchler
[08-02-02 22:16]: On Friday 02 August 2002 21:51, Anders Johansson wrote:
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su.
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
What are the attributes of /Data ??
/Data is a directory, owner is root
Not what I asked. I would like to see permissions, etc. ls -la Also, why do you send me duplicates? I subscribe to SLE. Thats where I asked the questions first. -- Patrick Shanahan Registered Linux User #207535 @ http://counter.li.org Please DO NOT carbon me on replies to list unless you are requesting duplicate responses which I will give.
On Saturday 03 August 2002 05:11, Dennis J.Tuchler wrote:
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
OK, I think I know what the problem is here. Am I right in thinking /Data is the mount point for a fat16 or fat32 partition? You can't change ownership of that with chown, you need to give the ownership as a mount option (-o uid=XXX). You will not be able to do this if you log in as root either. What about the deletion of a directory. What were the commands there? //Anders
On Fri, 2 Aug 2002, Dennis J.Tuchler wrote:
On Friday 02 August 2002 21:51, Anders Johansson wrote:
On Saturday 03 August 2002 04:47, Dennis J.Tuchler wrote:
I couldn't delete a directory in user or su that I could delete as root
I couldn't change owner from root to me(as user) as su
Could you show us the exact commands you used, and the error messages you got? If possible, do it in a konsole window and paste the whole sequence into the mail, starting from when you su.
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
Is it possible that '/Data' is an smbfs mounted filesystem on a Windows box? What do the following commands show? mount ls -lFd /Data If the mount command shows something like //name/xx on /Data type smbfs (0) and the ls command shows something like drwxr-xr-x 1 root root 512 Aug 2 20:30 /Data/ The problem is that not even root can change the ownership of smbfs files, because they don't have that information in the filesystem. To get around the problem (if that's it), add "fmask=666,dmask=777" to the mount options you give to mount the smbfs share. Jim
dennis@linux:/">su root@linux:/> root@linux:/>chown dennis /Data chown: changing ownership of '/Data': Operation not permitted
Dennis, if what you send as is a cut and paste from the konsole, I'm surprised I don't see the request for password after you issued "su" Could you ask "whoami" before trying to "chown"' and tell us the answer? Thanks, Dan. -- Binaries might die, but source code lives forever
participants (12)
-
Anders Johansson
-
Christopher Mahmood
-
Dale Schuster
-
Dan Laba
-
Dennis J.Tuchler
-
Dennis Tuchler
-
Doug McGarrett
-
Jim Cunning
-
Jon Clausen
-
mike
-
Sjoerd Hiemstra
-
SuSEnixER