TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: DENNIS LEE BIEBER
from: ROBH
date: 2018-06-14 18:39:00
subject: Re: ftp causing invalid s

On 14/06/18 17:59, Dennis Lee Bieber wrote:
> 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)
>
>

Ok, I'll have a look at that.

Anyways, this is what I have tried so far

pi@raspberrypi:~ $ chown -R pi /mnt
pi@raspberrypi:~ $ chown -R pi /mnt/CCTV
pi@raspberrypi:~ $ chown -R pi /mnt/CCTV/PiZero

pi@raspberrypi:~ $ cd Downloads
pi@raspberrypi:~/Downloads $ python intruder.py
Traceback (most recent call last):
   File "intruder.py", line 37, in 
     shutil.copyfile(RAMname, NASname)
   File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
     with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied:
'/mnt/CCTV/PiZero/2018-06-14_17.35.31.h264'

pi@raspberrypi:~ $ chown -R pi:pi /mnt/CCTV/PiZero
chown: changing ownership of
'/mnt/CCTV/PiZero/2018-06-14_17.35.31.h264': Operation not permitted



pi@raspberrypi:~ $ sudo chmod -R pi=pi /mnt
chmod: invalid mode: ‘pi=pi’
Try 'chmod --help' for more information.


I have been googling this permissions problem and have tried what you
see from what others have said.

The main problem I have is no matter what I try or do, the permissions
do not change for the /mnt directory. This is owner and group of root.

The other child folder permissons are owned  by pi, and group pi, so
unless I can get the permissions changed for /mnt, Ill never get my
project finished.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.