Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

  1. More ways to get the info! - we shoot all of our new original content out as well as random messages on Twitter and our newsletter!. Twitter | Newsletter
    Dismiss Notice

File Permissions - chmod

Discussion in 'Linux Beginner Tutorials' started by Rob, Jul 9, 2013.

  1. CptCharis

    CptCharis Well-Known Member

    Joined:
    Feb 27, 2018
    Messages:
    319
    Likes Received:
    303
    Just choose a category and you will see a blue button

    “ post new thread “

    B7A592B4-BBE0-42E5-9684-6C47D5A7416A.png


    (Log in to hide this advertisement)

     
    LangLiu, atanere, Rob and 1 other person like this.
  2. Sergio Rodriguez

    Sergio Rodriguez New Member

    Joined:
    Mar 9, 2019
    Messages:
    7
    Likes Received:
    3
    In the case of Debian, cron is located in /etc/ directory.
     
  3. rado84

    rado84 Active Member

    Joined:
    Feb 25, 2019
    Messages:
    150
    Likes Received:
    109
    That's a nice tutorial but I found a lot easier way - with fstab: just add "uid=1000" in the options for each partition you want to be its owner, reboot and that's it.

    Code:
    UUID=79efb309-826e-40a7-a786-7b83b682dcb4 /               ext4    errors=remount-ro 0       1
    UUID=88FCD635FCD61CEE /media/rado/Drive_D               ntfs    errors=remount-ro,uid=1000 0       1
    UUID=6F01A23F6CA00FCF /media/rado/Drive_E               ntfs    errors=remount-ro,uid=1000 0       1
    
     
  4. wizardfromoz

    wizardfromoz Super Moderator
    Staff Member Gold Supporter

    Joined:
    Apr 30, 2017
    Messages:
    2,839
    Likes Received:
    2,280
    You are already uid=1000 by default, as the first normal (non-root) user set up by the system.

    Code:
    grep 1000 /etc/passwd
    ... should show rado and 1000

    Also, although you may only be showing an example above with the NTFS partitions/drives, that method might have relevance if you are playing games that were Windows-based and you want to be able to access them (say, under Steam or Proton) under Linux so as not to have to set up new files, but other than that you are lowering security.

    @Rob has, at the beginning

    My highlighting.

    Besides, in Linux, you already have root privileges over Windows NTFS files and folders.

    An example is here

    Code:
    [email protected]:~$ cd /media/chris/OS/Windows/System32/GroupPolicy
    [email protected]:/media/chris/OS/Windows/System32/GroupPolicy$ ls -l
    total 1
    -rwxrwxrwx 1 chris chris 128 Mar  5 13:45 GPT.INI
    drwxrwxrwx 1 chris chris   0 Feb  2 13:07 Machine
    drwxrwxrwx 1 chris chris   0 Feb  2 13:07 User
    
    So I already own those files and folders, without having to change anything.

    Chmod (this Tutorial's subject) and chown are designed to be able to change the defaults of user access as part of a secure plan by the Administrator, as well as, in the case of chown, modifying downloaded files to make them executable.

    Again as Rob has said, in 2013,

    Whatever works for you with fstab, though, is great, it is a very useful file.

    Cheers

    Chris Turner
    wizardfromoz
     
  5. shadow543

    shadow543 New Member

    Joined:
    Apr 14, 2019
    Messages:
    1
    Likes Received:
    0
    What is 's' in following permission: srwxrwxr-x ??
     
  6. wizardfromoz

    wizardfromoz Super Moderator
    Staff Member Gold Supporter

    Joined:
    Apr 30, 2017
    Messages:
    2,839
    Likes Received:
    2,280
    setuid

    Welcome to linux.org @shadow543 :). Google under

    linux srwxrwxr-x

    ... and you will find some good reading.

    Cheers

    Chris Turner
    wizardfromoz
     

Share This Page