Linux Linux SMB with Root Level Access

Discussion in 'Software' started by Modsbywoz, 15 Aug 2013.

  1. Modsbywoz

    Modsbywoz Multimodder

    Joined:
    14 Oct 2009
    Posts:
    2,772
    Likes Received:
    264
    I need to setup a SMB Share on CentOS 6 which has access rights of a Root User.

    It needs to be the Root user as the program generating the files i need access to will only run as Root.

    I've played all day with the access rights but can't get it to work. Any help would be great!
     
  2. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,943
    Likes Received:
    268
    What do you mean "access rights of a root user". You want to be the share mounted as a root user ? Or the generated files need to have UID/GID of the root user ?

    To be honest, i don't really understand why do you even need that - root user can do anything, so once you have your share mounted, you can read/write any file, in any folder...

    Edit: Or if i understand correctly :
    1) you run a program, it writes files with root:root as the owner.
    2) you need to access these files via SMB and to read them.

    If that is the case, why don't you just change the umask for the files generated by that program, and then any SMB user will be able to read or write to the files (depending on the umask) ?
    http://en.wikipedia.org/wiki/Umask
     
  3. Modsbywoz

    Modsbywoz Multimodder

    Joined:
    14 Oct 2009
    Posts:
    2,772
    Likes Received:
    264
    The SMB user needs to have root privileges when accessing the share. For some odd reason I can't find out how to do this.
     
  4. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,943
    Likes Received:
    268
    The question is, why ? Because files generated by the software you need to read from the remote computers have root:root as owner rw- --- --- rights and/or directories have rwx --- --- rights ? For that, the solution is changing the umask, see above.
     

Share This Page