Why do I have to use âsudoâ when I am in the super user group?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ groups martin
martin : martin wheel
I am under my own home directory:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ pwd
/home/martin/anaconda3
But when I tried delete a file in my own directory, I received this error:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Why is that?
permissions authorization
add a comment |Â
up vote
3
down vote
favorite
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ groups martin
martin : martin wheel
I am under my own home directory:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ pwd
/home/martin/anaconda3
But when I tried delete a file in my own directory, I received this error:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Why is that?
permissions authorization
It looks like you have an alias or overriding script forrm
; please edit in the output oftype rm
.
â Michael Homer
Aug 11 at 2:56
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ groups martin
martin : martin wheel
I am under my own home directory:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ pwd
/home/martin/anaconda3
But when I tried delete a file in my own directory, I received this error:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Why is that?
permissions authorization
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ groups martin
martin : martin wheel
I am under my own home directory:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ pwd
/home/martin/anaconda3
But when I tried delete a file in my own directory, I received this error:
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Why is that?
permissions authorization
permissions authorization
asked Aug 11 at 2:46
user697911
1142
1142
It looks like you have an alias or overriding script forrm
; please edit in the output oftype rm
.
â Michael Homer
Aug 11 at 2:56
add a comment |Â
It looks like you have an alias or overriding script forrm
; please edit in the output oftype rm
.
â Michael Homer
Aug 11 at 2:56
It looks like you have an alias or overriding script for
rm
; please edit in the output of type rm
.â Michael Homer
Aug 11 at 2:56
It looks like you have an alias or overriding script for
rm
; please edit in the output of type rm
.â Michael Homer
Aug 11 at 2:56
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
Background
The 3rd example you showed where you're attempting to rm
the file looks to have the rm
command overloaded with a sequence of commands, one of which, attempts to do a mv
of the file to /export/.trash
.
Permissions
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Look at the permissions for /export/.trash/
:
$ ls -ld /export/.trash
Everything should be owned by your user 'martin' so that this account can delete files and optionally mv
them to this directory.
I suspect someone used the sudo
command when working in this directory and, perhaps accidentally, set the permissions of the .trash
directory so that root owns it.
Overloaded command
Regarding your rm
command. You can check if it's been overloaded as an alias or a shell function with the same name using the type
command. Examples:
$ type -f rm
rm is aliased to `rm -i'
$ type -f mv
mv is aliased to `mv -i'
Here we can see that the mv
and rm
commands have been overloaded as aliases to mv -i
and rm -i
.
add a comment |Â
up vote
0
down vote
I agree that the output from rm
indicates the rm
is an alias or a function doing something else, from the path name it seems to try to move to a trash directory instead of removing.
To address the original question, group 0 (wheel
) basically means nothing. On BSD based systems, su
(not sudo
) to root is restricted to members of the wheel
grouup, but that is just a function of the su
command on BSD and not a function of the OS itself.
The sudo
command is commonly used on Linux. It is highly configurable. Membership in group 0 can be made a requirement to be able to use sudo
, but doesn't automatically use sudo
.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Background
The 3rd example you showed where you're attempting to rm
the file looks to have the rm
command overloaded with a sequence of commands, one of which, attempts to do a mv
of the file to /export/.trash
.
Permissions
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Look at the permissions for /export/.trash/
:
$ ls -ld /export/.trash
Everything should be owned by your user 'martin' so that this account can delete files and optionally mv
them to this directory.
I suspect someone used the sudo
command when working in this directory and, perhaps accidentally, set the permissions of the .trash
directory so that root owns it.
Overloaded command
Regarding your rm
command. You can check if it's been overloaded as an alias or a shell function with the same name using the type
command. Examples:
$ type -f rm
rm is aliased to `rm -i'
$ type -f mv
mv is aliased to `mv -i'
Here we can see that the mv
and rm
commands have been overloaded as aliases to mv -i
and rm -i
.
add a comment |Â
up vote
1
down vote
Background
The 3rd example you showed where you're attempting to rm
the file looks to have the rm
command overloaded with a sequence of commands, one of which, attempts to do a mv
of the file to /export/.trash
.
Permissions
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Look at the permissions for /export/.trash/
:
$ ls -ld /export/.trash
Everything should be owned by your user 'martin' so that this account can delete files and optionally mv
them to this directory.
I suspect someone used the sudo
command when working in this directory and, perhaps accidentally, set the permissions of the .trash
directory so that root owns it.
Overloaded command
Regarding your rm
command. You can check if it's been overloaded as an alias or a shell function with the same name using the type
command. Examples:
$ type -f rm
rm is aliased to `rm -i'
$ type -f mv
mv is aliased to `mv -i'
Here we can see that the mv
and rm
commands have been overloaded as aliases to mv -i
and rm -i
.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Background
The 3rd example you showed where you're attempting to rm
the file looks to have the rm
command overloaded with a sequence of commands, one of which, attempts to do a mv
of the file to /export/.trash
.
Permissions
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Look at the permissions for /export/.trash/
:
$ ls -ld /export/.trash
Everything should be owned by your user 'martin' so that this account can delete files and optionally mv
them to this directory.
I suspect someone used the sudo
command when working in this directory and, perhaps accidentally, set the permissions of the .trash
directory so that root owns it.
Overloaded command
Regarding your rm
command. You can check if it's been overloaded as an alias or a shell function with the same name using the type
command. Examples:
$ type -f rm
rm is aliased to `rm -i'
$ type -f mv
mv is aliased to `mv -i'
Here we can see that the mv
and rm
commands have been overloaded as aliases to mv -i
and rm -i
.
Background
The 3rd example you showed where you're attempting to rm
the file looks to have the rm
command overloaded with a sequence of commands, one of which, attempts to do a mv
of the file to /export/.trash
.
Permissions
[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ rm test2.ipynb
mv: cannot create regular file âÂÂ/export/.trash/test2.ipynbâÂÂ: Permission denied
Look at the permissions for /export/.trash/
:
$ ls -ld /export/.trash
Everything should be owned by your user 'martin' so that this account can delete files and optionally mv
them to this directory.
I suspect someone used the sudo
command when working in this directory and, perhaps accidentally, set the permissions of the .trash
directory so that root owns it.
Overloaded command
Regarding your rm
command. You can check if it's been overloaded as an alias or a shell function with the same name using the type
command. Examples:
$ type -f rm
rm is aliased to `rm -i'
$ type -f mv
mv is aliased to `mv -i'
Here we can see that the mv
and rm
commands have been overloaded as aliases to mv -i
and rm -i
.
edited Aug 11 at 3:15
answered Aug 11 at 3:02
slmâ¦
238k65491662
238k65491662
add a comment |Â
add a comment |Â
up vote
0
down vote
I agree that the output from rm
indicates the rm
is an alias or a function doing something else, from the path name it seems to try to move to a trash directory instead of removing.
To address the original question, group 0 (wheel
) basically means nothing. On BSD based systems, su
(not sudo
) to root is restricted to members of the wheel
grouup, but that is just a function of the su
command on BSD and not a function of the OS itself.
The sudo
command is commonly used on Linux. It is highly configurable. Membership in group 0 can be made a requirement to be able to use sudo
, but doesn't automatically use sudo
.
add a comment |Â
up vote
0
down vote
I agree that the output from rm
indicates the rm
is an alias or a function doing something else, from the path name it seems to try to move to a trash directory instead of removing.
To address the original question, group 0 (wheel
) basically means nothing. On BSD based systems, su
(not sudo
) to root is restricted to members of the wheel
grouup, but that is just a function of the su
command on BSD and not a function of the OS itself.
The sudo
command is commonly used on Linux. It is highly configurable. Membership in group 0 can be made a requirement to be able to use sudo
, but doesn't automatically use sudo
.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I agree that the output from rm
indicates the rm
is an alias or a function doing something else, from the path name it seems to try to move to a trash directory instead of removing.
To address the original question, group 0 (wheel
) basically means nothing. On BSD based systems, su
(not sudo
) to root is restricted to members of the wheel
grouup, but that is just a function of the su
command on BSD and not a function of the OS itself.
The sudo
command is commonly used on Linux. It is highly configurable. Membership in group 0 can be made a requirement to be able to use sudo
, but doesn't automatically use sudo
.
I agree that the output from rm
indicates the rm
is an alias or a function doing something else, from the path name it seems to try to move to a trash directory instead of removing.
To address the original question, group 0 (wheel
) basically means nothing. On BSD based systems, su
(not sudo
) to root is restricted to members of the wheel
grouup, but that is just a function of the su
command on BSD and not a function of the OS itself.
The sudo
command is commonly used on Linux. It is highly configurable. Membership in group 0 can be made a requirement to be able to use sudo
, but doesn't automatically use sudo
.
answered Aug 11 at 15:14
RalfFriedl
3,6401522
3,6401522
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461938%2fwhy-do-i-have-to-use-sudo-when-i-am-in-the-super-user-group%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
It looks like you have an alias or overriding script for
rm
; please edit in the output oftype rm
.â Michael Homer
Aug 11 at 2:56