Ownership and rights of files on the Raspberry Pi
Posted: Sunday 16 December 2018 16:29
On my Raspberry PI with Domoticz the files have ‘pi’ as owner and ‘rwxrwxrwx’ as rights.
With a FTP program I can download these files to my local harddisk.
In a dzVents script I make output files. These files have ‘root’ as owner and ‘rw-r-----' as rights.
With a FTP program I CANNOT download these files to my local harddisk.
With the command: ‘sudo chown pi:pi filename’ I can change the owner and then I can download the file. I don’t want to do this every time.
In dzVents I use:
How can I make in dzVents output files with the proper ownership and rights?
With a FTP program I can download these files to my local harddisk.
In a dzVents script I make output files. These files have ‘root’ as owner and ‘rw-r-----' as rights.
With a FTP program I CANNOT download these files to my local harddisk.
With the command: ‘sudo chown pi:pi filename’ I can change the owner and then I can download the file. I don’t want to do this every time.
In dzVents I use:
Code: Select all
local file = io.open(fileName, "w+")
io.output(file)
io.write("—Some strings— " .. item.name .. "\n")
io.write("—Some strings— " .. etcetera .. "\n")
io.close(file)