Mince_67
Posts: 1
Joined: Tue Aug 20, 2019 10:00 pm

Files going 'read only'

Tue Aug 20, 2019 11:14 pm

Look for some help, I have a simple loop recording setup that deletes and old video file and records a new one.
It works fine but randomly a video file becomes read-only and locks up the system when it tries to delete the file. I have also found other files like the python script also can become read-only.
I have tried storing on the SD card and usb stick.
I have tried using Raspian, Raspian lite and Ubuntu mate and all are doing the same.

Any advice

bjtheone
Posts: 296
Joined: Mon May 20, 2019 11:28 pm
Location: Kanata, Ontario, Canada

Re: Files going 'read only'

Wed Aug 21, 2019 1:35 am

Could you provide the script that does the "loop"? Files don't just randomly change permissions. Permission are very fundamental to Unix/Linux, have worked the same way for a really long time and don't just randomly change. Either something in your setup/config/environment is incorrect such that you create files with read only or you are changing permissions from r/w to r-o.

Depending on how you are running a script file and what user you are running it as, it may get a different environment and behave differently, but it is not going to behave randomly.

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: Files going 'read only'

Wed Aug 21, 2019 7:42 am

Perhaps the device is mounting read only at times and you think that it is the files. You might see an error message in dmesg about this. You can list and change read only flag with hdparm.

It might be a sign that the drive is going bad, they tend to do this when they are showing hardware issues

Return to “General discussion”