Re: [Hampshire] NAS permissions

Top Page

Reply to this message
Author: Michael Daffin
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] NAS permissions
Chris is correct, if you want to write a file as root you should pipe the
output through 'sudo tee'

    uname -a | sudo tee /mnt/abcd/xyz


This invokes uname as the normal user, but pipes it to tee which is running
as root, so writes to the file as root (it also prints the output to stdout
as well, so can be redirected further if you wish).

What are the current permissions of the mount and its contents? Can you
write to a sub directory?

On 1 January 2014 17:39, Chris Malton <chrism@???> wrote:

> H Rob,
>
> On 01/01/14 17:31, Rob Malpass wrote:
>
> sudo uname –a > /mnt/abcd/xyz
>
> uname -a will run as root, the output redirect runs as the invoking user.
> Therefore, it sounds like a Linux permissions issue over who owns the
> mountpoint. I need to understand this myself - so I'll let you know if I
> come up with anything.
>
> Regards,
>
> Chris
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>




--
Michael Daffin <james1479@???>
--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------