karvp Posted April 14, 2024 Posted April 14, 2024 Hello, so I got this error when trying to write a file: PermissionError: [Errno 13] Does Heliohost's Johnny server allow us to write? And if not, are there alternative ways? Quote
wolstech Posted April 18, 2024 Posted April 18, 2024 What is trying to write to the file (PHP, node, etc.)? What are the permissions on the folder where the file will go? Sorry about the slow response. We don't read the section you posted this in regularly. For things needing admin attention, customer service or questions will get you a faster response. Moved. 1 Quote
karvp Posted April 18, 2024 Author Posted April 18, 2024 I am using Python. The folder permission is 'rwx r-x r-x' all the way down to the file from httpdocs (I changed it recursively). However, the file stayed at 'rw- r-- r--' no matter how I changed it. Also, when I try to write a non-existent file open("nonexist.ext", "w") It also result with an permission error. Anyway, when I tried to write a file from php, it worked. I thought about using FTP and binding php with python but it consumes more memory and cpu, which I don't want it to. Quote
wolstech Posted April 18, 2024 Posted April 18, 2024 Try making the folders where the files will go have 757 (rwx r-x rwx) and see if the file writes successfully. If that doesn't work, try 775. I forget if it's "group" or "other" that needs it, but IIRC one of the two needs write permissions in order for Python to write files... Quote
karvp Posted April 19, 2024 Author Posted April 19, 2024 Thanks. Idk why it didn't work before but it does now. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.