On Thu, 14 Jun 2018 15:59:29 +0100, RobH declaimed the
following:
>On 14/06/18 13:23, Dennis Lee Bieber wrote:
>> On Thu, 14 Jun 2018 12:04:01 +0100, RobH declaimed the
>> following:
>>
>>> pi@raspberrypi:/mnt $ sudo chown -R 777 /mnt/CCTV
>>
>> Unless you have a user named "777" those parameters are wrong.
>> http://www.linfo.org/chown.html
>> """
>> The basic syntax for using chown to change owners is
>>
>> chown [options] new_owner object(s)
>> """
>>
>>
>>> drwxr-xr-x 3 777 root 4096 Jun 5 09:50 CCTV
>> ^^^ ^^^^
>>
>> ^^^ user name
>> ^^^^ group name
>>
>> Try
>>
>> chown -R pi /mnt/CCTV
>>
>> Or (untried) create a new group (call it NASuser), chown the mount
>> point to that group, and then add pi user to the new group.
>>
>>
>> That 777 looks like you are trying to set permission levels (the rwx
>> stuff you see on the left). That command is chmod
>>
https://www.linode.com/docs/tools-reference/tools/modify-file-permissions-with-
chmod/
>>
>>
>>
>>
>
>I have changed 777 to 775.
>
>The reason I used it was because I didn't want any problems with no
>permissions either writing the file to my NAS box and viewing the file
>as a user
>
>chown -R pi /mnt/CCTV
>returns this:
>
>chown: changing ownership of '/mnt/CCTV/PiZero/dht.cpp': Operation not
>permitted
>chown: changing ownership of
>'/mnt/CCTV/PiZero/2018-06-14_10.12.34.h264': Operation not permitted
>chown: changing ownership of
>'/mnt/CCTV/PiZero/2018-050-23_17.m%.19.h264': Operation not permitted
>
>I used sudo chmod without any errors.
If you had used "chmod" without "sudo" you'd have had the same error
All "sudo" prefix does is say "execute the following command using
"root" privileges... I presumed you'd realize that changing ownership would
require those elevated privileges and would use the sudo prefix; I merely
suggested the proper syntax for the "chown" part.
>
>Using this eample, does the group have to be named, as in g= name of group??
>
>chmod -R +w,g=rw,o-rw, ~/group-project-files/
Look at the output of "ls -l", it will tell you the owner, and the
group, that a file belongs to. If the user is a member of the group, it
will have the group privileges.
What the above command did is: add write (modify) privilege -- likely
for the owner (who already had it), set group member access to read/write,
and change "other" access to remove read/write (no access at all unless the
files had eXecute privilege for "other".
Even before you get a book on Linux basics, try to learn how to read
the result of
man command-of-interest
(though you may have to install the man pages; I don't recall if RPi
installs those by default)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|