stockton
Posts: 136
Joined: Mon Aug 24, 2015 6:06 am
Location: South Africa
Contact: Website

Apache/Raspbian file Permissions

Wed Aug 22, 2018 8:26 am

I need to create a "real time" web page which reads data from a USB attached HDD at /media.pi/MyPassport/Axpert/solar.log.
I am getting a permissions error when I attempt reading that file via CGI/AJAX but when I run said program from command line it works perfectly.
pi@RPiDev:~ $ ls -al /media/pi/MyPassport/Axpert/solar.log
-rwxrwxrwx 1 pi pi 131 Aug 22 10:17 /media/pi/MyPassport/Axpert/solar.log
I have attempted altering the files permissions but this fails.
pi@RPiDev:~ $ sudo chown root:users /media/pi/MyPassport/Axpert/solar.log
chown: changing ownership of '/media/pi/MyPassport/Axpert/solar.log': Operation not permitted

Please tell me how to resolve this issue.
BTW I have posted here as permissions are set, in my opinion by raspbian, but if needs be this could be moved to a more appropriate forum.

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Apache/Raspbian file Permissions

Wed Aug 22, 2018 9:40 am

What are the filesystem on the HDD ? FAT32 does not support linux access rights so access rights are set when the filesystem is mounted.

stockton
Posts: 136
Joined: Mon Aug 24, 2015 6:06 am
Location: South Africa
Contact: Website

Re: Apache/Raspbian file Permissions

Wed Aug 22, 2018 10:00 am

Not FAT32, normal ext3.

Return to “Raspberry Pi OS”