What kind of owner and group for these below list of files?
what is the owner and group of this below file? It has 0 and 0 for owner and group.
-rw-rw-rw- 1 0 0 464 Oct 16 14:31 a.txt
I found those permissions after connecting to a remote server for which we does not have write permissions.
How to replicate the same permisions in my development machine?
linux file-permissions rhel
add a comment |
what is the owner and group of this below file? It has 0 and 0 for owner and group.
-rw-rw-rw- 1 0 0 464 Oct 16 14:31 a.txt
I found those permissions after connecting to a remote server for which we does not have write permissions.
How to replicate the same permisions in my development machine?
linux file-permissions rhel
UID == 0
andGID == 0
areroot
. As rootchmod 0666 filename && chown root:root filename
– David C. Rankin
Nov 13 '18 at 5:00
i.e. no other user (other than root) can be able to rename that file right?
– Kalyan Kumar
Nov 13 '18 at 5:03
Right. The only way to alter it is either logged in asroot
or logged in as you andsu
toroot
or call thechmod
andchown
withsudo
. (which is justsu
do..) Also, if you get rid of the-n
option to yourls
command and just usels -al /path/to/whatever
you will see theuser
andgroup
names instead of the numbers.
– David C. Rankin
Nov 13 '18 at 5:07
I tried that, I did sudo to become the root and then ran 'chmod 0666 filename' and also 'chown root:root filename'. Now, after that, I logged in as myself, but I am able to rename that file, which i am not expecting, why I am able to rename even after setting the restricted permissions?
– Kalyan Kumar
Nov 13 '18 at 6:34
Well, of course you can, and I apologize,-rw-rw-rw-
means the file is'-'
not a directory (otherwise'd'
would be first), both'r'
readable and'w'
writable (rw-
) by its owner (root
),rw-
by any member of theroot
group ANDrw-
by (world) anyone. Meaning any user can read and write the file and change its name or permissions -- BUT onlyroot
or members of theroot
group can change the user or group ownership TOroot
.
– David C. Rankin
Nov 13 '18 at 15:02
add a comment |
what is the owner and group of this below file? It has 0 and 0 for owner and group.
-rw-rw-rw- 1 0 0 464 Oct 16 14:31 a.txt
I found those permissions after connecting to a remote server for which we does not have write permissions.
How to replicate the same permisions in my development machine?
linux file-permissions rhel
what is the owner and group of this below file? It has 0 and 0 for owner and group.
-rw-rw-rw- 1 0 0 464 Oct 16 14:31 a.txt
I found those permissions after connecting to a remote server for which we does not have write permissions.
How to replicate the same permisions in my development machine?
linux file-permissions rhel
linux file-permissions rhel
edited Nov 13 '18 at 4:57
Kalyan Kumar
asked Nov 13 '18 at 4:55
Kalyan KumarKalyan Kumar
15
15
UID == 0
andGID == 0
areroot
. As rootchmod 0666 filename && chown root:root filename
– David C. Rankin
Nov 13 '18 at 5:00
i.e. no other user (other than root) can be able to rename that file right?
– Kalyan Kumar
Nov 13 '18 at 5:03
Right. The only way to alter it is either logged in asroot
or logged in as you andsu
toroot
or call thechmod
andchown
withsudo
. (which is justsu
do..) Also, if you get rid of the-n
option to yourls
command and just usels -al /path/to/whatever
you will see theuser
andgroup
names instead of the numbers.
– David C. Rankin
Nov 13 '18 at 5:07
I tried that, I did sudo to become the root and then ran 'chmod 0666 filename' and also 'chown root:root filename'. Now, after that, I logged in as myself, but I am able to rename that file, which i am not expecting, why I am able to rename even after setting the restricted permissions?
– Kalyan Kumar
Nov 13 '18 at 6:34
Well, of course you can, and I apologize,-rw-rw-rw-
means the file is'-'
not a directory (otherwise'd'
would be first), both'r'
readable and'w'
writable (rw-
) by its owner (root
),rw-
by any member of theroot
group ANDrw-
by (world) anyone. Meaning any user can read and write the file and change its name or permissions -- BUT onlyroot
or members of theroot
group can change the user or group ownership TOroot
.
– David C. Rankin
Nov 13 '18 at 15:02
add a comment |
UID == 0
andGID == 0
areroot
. As rootchmod 0666 filename && chown root:root filename
– David C. Rankin
Nov 13 '18 at 5:00
i.e. no other user (other than root) can be able to rename that file right?
– Kalyan Kumar
Nov 13 '18 at 5:03
Right. The only way to alter it is either logged in asroot
or logged in as you andsu
toroot
or call thechmod
andchown
withsudo
. (which is justsu
do..) Also, if you get rid of the-n
option to yourls
command and just usels -al /path/to/whatever
you will see theuser
andgroup
names instead of the numbers.
– David C. Rankin
Nov 13 '18 at 5:07
I tried that, I did sudo to become the root and then ran 'chmod 0666 filename' and also 'chown root:root filename'. Now, after that, I logged in as myself, but I am able to rename that file, which i am not expecting, why I am able to rename even after setting the restricted permissions?
– Kalyan Kumar
Nov 13 '18 at 6:34
Well, of course you can, and I apologize,-rw-rw-rw-
means the file is'-'
not a directory (otherwise'd'
would be first), both'r'
readable and'w'
writable (rw-
) by its owner (root
),rw-
by any member of theroot
group ANDrw-
by (world) anyone. Meaning any user can read and write the file and change its name or permissions -- BUT onlyroot
or members of theroot
group can change the user or group ownership TOroot
.
– David C. Rankin
Nov 13 '18 at 15:02
UID == 0
and GID == 0
are root
. As root chmod 0666 filename && chown root:root filename
– David C. Rankin
Nov 13 '18 at 5:00
UID == 0
and GID == 0
are root
. As root chmod 0666 filename && chown root:root filename
– David C. Rankin
Nov 13 '18 at 5:00
i.e. no other user (other than root) can be able to rename that file right?
– Kalyan Kumar
Nov 13 '18 at 5:03
i.e. no other user (other than root) can be able to rename that file right?
– Kalyan Kumar
Nov 13 '18 at 5:03
Right. The only way to alter it is either logged in as
root
or logged in as you and su
to root
or call the chmod
and chown
with sudo
. (which is just su
do..) Also, if you get rid of the -n
option to your ls
command and just use ls -al /path/to/whatever
you will see the user
and group
names instead of the numbers.– David C. Rankin
Nov 13 '18 at 5:07
Right. The only way to alter it is either logged in as
root
or logged in as you and su
to root
or call the chmod
and chown
with sudo
. (which is just su
do..) Also, if you get rid of the -n
option to your ls
command and just use ls -al /path/to/whatever
you will see the user
and group
names instead of the numbers.– David C. Rankin
Nov 13 '18 at 5:07
I tried that, I did sudo to become the root and then ran 'chmod 0666 filename' and also 'chown root:root filename'. Now, after that, I logged in as myself, but I am able to rename that file, which i am not expecting, why I am able to rename even after setting the restricted permissions?
– Kalyan Kumar
Nov 13 '18 at 6:34
I tried that, I did sudo to become the root and then ran 'chmod 0666 filename' and also 'chown root:root filename'. Now, after that, I logged in as myself, but I am able to rename that file, which i am not expecting, why I am able to rename even after setting the restricted permissions?
– Kalyan Kumar
Nov 13 '18 at 6:34
Well, of course you can, and I apologize,
-rw-rw-rw-
means the file is '-'
not a directory (otherwise 'd'
would be first), both 'r'
readable and 'w'
writable ( rw-
) by its owner (root
), rw-
by any member of the root
group AND rw-
by (world) anyone. Meaning any user can read and write the file and change its name or permissions -- BUT only root
or members of the root
group can change the user or group ownership TO root
.– David C. Rankin
Nov 13 '18 at 15:02
Well, of course you can, and I apologize,
-rw-rw-rw-
means the file is '-'
not a directory (otherwise 'd'
would be first), both 'r'
readable and 'w'
writable ( rw-
) by its owner (root
), rw-
by any member of the root
group AND rw-
by (world) anyone. Meaning any user can read and write the file and change its name or permissions -- BUT only root
or members of the root
group can change the user or group ownership TO root
.– David C. Rankin
Nov 13 '18 at 15:02
add a comment |
1 Answer
1
active
oldest
votes
0:0 is almost always root:root owner and group. The command, cat /etc/group
shows group ID numbers. In most (all?) cases, users and groups with the same name share the same ID number.
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53274049%2fwhat-kind-of-owner-and-group-for-these-below-list-of-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
0:0 is almost always root:root owner and group. The command, cat /etc/group
shows group ID numbers. In most (all?) cases, users and groups with the same name share the same ID number.
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
add a comment |
0:0 is almost always root:root owner and group. The command, cat /etc/group
shows group ID numbers. In most (all?) cases, users and groups with the same name share the same ID number.
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
add a comment |
0:0 is almost always root:root owner and group. The command, cat /etc/group
shows group ID numbers. In most (all?) cases, users and groups with the same name share the same ID number.
0:0 is almost always root:root owner and group. The command, cat /etc/group
shows group ID numbers. In most (all?) cases, users and groups with the same name share the same ID number.
edited Nov 13 '18 at 5:02
answered Nov 13 '18 at 5:00
hellorkhellork
935
935
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
add a comment |
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Do I need to run "chown 0:0 a.txt" to repliacate that permission in my dev server?
– Kalyan Kumar
Nov 13 '18 at 5:01
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
Since it's a text file, you can set permissions to anything you want without problems. Unless it's required by some program, and it expects owner to be root (unlikely), you can change it to be owned by the desktop user (you) or leave it alone.
– hellork
Nov 13 '18 at 5:06
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53274049%2fwhat-kind-of-owner-and-group-for-these-below-list-of-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
UID == 0
andGID == 0
areroot
. As rootchmod 0666 filename && chown root:root filename
– David C. Rankin
Nov 13 '18 at 5:00
i.e. no other user (other than root) can be able to rename that file right?
– Kalyan Kumar
Nov 13 '18 at 5:03
Right. The only way to alter it is either logged in as
root
or logged in as you andsu
toroot
or call thechmod
andchown
withsudo
. (which is justsu
do..) Also, if you get rid of the-n
option to yourls
command and just usels -al /path/to/whatever
you will see theuser
andgroup
names instead of the numbers.– David C. Rankin
Nov 13 '18 at 5:07
I tried that, I did sudo to become the root and then ran 'chmod 0666 filename' and also 'chown root:root filename'. Now, after that, I logged in as myself, but I am able to rename that file, which i am not expecting, why I am able to rename even after setting the restricted permissions?
– Kalyan Kumar
Nov 13 '18 at 6:34
Well, of course you can, and I apologize,
-rw-rw-rw-
means the file is'-'
not a directory (otherwise'd'
would be first), both'r'
readable and'w'
writable (rw-
) by its owner (root
),rw-
by any member of theroot
group ANDrw-
by (world) anyone. Meaning any user can read and write the file and change its name or permissions -- BUT onlyroot
or members of theroot
group can change the user or group ownership TOroot
.– David C. Rankin
Nov 13 '18 at 15:02