What kind of owner and group for these below list of files?












-3















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?










share|improve this question

























  • 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











  • 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











  • 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


















-3















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?










share|improve this question

























  • 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











  • 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











  • 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
















-3












-3








-3








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 4:57







Kalyan Kumar

















asked Nov 13 '18 at 4:55









Kalyan KumarKalyan Kumar

15




15













  • 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











  • 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











  • 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





















  • 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











  • 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











  • 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



















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














1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer


























  • 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













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
});


}
});














draft saved

draft discarded


















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: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.






share|improve this answer


























  • 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


















0














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.






share|improve this answer


























  • 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
















0












0








0







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








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





















  • 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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Full-time equivalent

さくらももこ

13 indicted, 8 arrested in Calif. drug cartel investigation