On 15/06/18 12:15, Martin Gregorie wrote:
> On Fri, 15 Jun 2018 10:41:02 +0100, RobH wrote:
>
>> On 15/06/18 00:32, Dennis Lee Bieber wrote:
>>> On Thu, 14 Jun 2018 20:04:35 +0100, RobH declaimed
>>> the following:
>>>
>>>
>>>> pi@raspberrypi:/mnt $ ls -l total 4 drwxrwxrwx 3 pi pi 4096 Jun 5
>>>> 09:50 CCTV
>>>>
>>>>
>>> Try
>>>
>>> ls -lR
>>>
>>> and ensure that ALL directories, not just CCTV, have been changed.
>>>
>>>
>>> The other side of the coin (recall, I do not have a NAS unit) is
> that
>>> the NAS may need to be configured with privileges for users.
>>>
>>> Forget about running the capture script... You need to get
> everything
>>> working from the command line first...
>>>
>>> Create some garbage file in your home directory
>>>
>>> $ date >~/junk.txt
>>>
>>> Then try moving that file to the mount point...
>>>
>>> $ mv ~/junk.txt /mnt/CCTV/PiZero/junk.txt
>>>
>>> That should represent what the script is trying to do.
>>>
>>>
>>>
>>>
>>>
>> After creating the junk.txt file and moving it:
>> pi@raspberrypi:~ $ mv ~/junk.txt /mnt/CCTV/PiZero/junk.txt mv:
>> preserving times for '/mnt/CCTV/PiZero/junk.txt': Operation not
>> permitted mv: preserving permissions for ‘/mnt/CCTV/PiZero/junk.txt’:
>> Input/output error
>>
>> The said file was moved to my NAS box on /mnt/CCTV/PiZero and shows as
>> 29 bytes but could not be opened. Because it is owned by root.
>>
>>
>> My NAS box is configured to accept connections and files from my CCTV
>> cameras, so there is not the problem.
>>
>> One thing I have noticed, and why I never mentioned before , I don't
>> know.
>>
>> When I do ls on the root of pi:
>>
>> pi@raspberrypi:~ $ ls Desktop Downloads Public Templates
>> Documents Music Pictures python_games Videos pi@raspberrypi:~ $
>>
>> the /mnt directory is not listed or showing, and that is because ls only
>> lists what is under /pi while /mnt is under /
>>
>> Just out of interest, I have created a /mnt directory under /pi, and
>> also CCTV/PiZero, then changed permissions and ownership for all the
>> directories.
>>
>> I am not sure but the python script might get confused as to which /mnt
>> directory it should use.
>>
>> Advise please
>
> Get one of the recommended Linux books and read the chapter on file
> ownership and permissions. Until you understand the concepts and how they
> work together you'll continue to struggle with this area.
>
> The way Linux enforces file ownership and access to files is very
> different from Windows. In the latter where these concepts are almost
> nonexistent because Windows is and always was fundamentally a single-user
> system with a bit of rudimentary multi-user stuff bolted on while Linux
> inherited its multi-user way of working, and the aim of actively
> preventing users from interfering with each other from Unix.
>
>
If you read my post at 11.30 GMT, you will see that I sort of corrected
what I said in the above post.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|