Issue
There's a script that I don't own but I have an execute (and read) permission on it. I do not have any write permission on the file system. The script tries to create some files on the file system and then it deletes them.
Hence, when I run the script I get "permission denied" messages, since I don't have permission to write on the file system.
How do I solve this?
One thing that cannot change is, that I'm not allowed to ask for permanent write permission on the file system, for my user. But I want to be able to create files, in the case that it's done through the script.
- If the changes that you suggest require to edit the script or its permissions, I can do it by asking the admin to do it for me. But generally the admin will not give me permanent write permission to any file on the system.
Solution
It feels to me that it's worth looking for a folder somewhere that is available to users for this kind of access. It could be possible to write to a user/
or tmp/
directory perhaps? What is/are the path(s) you are trying to write to?
Failing that I would look into why the script needs to write to and delete a file. Is it possible to use something less persistent e.g. variables rather than writing to file and avoid having to write files at all? What sort/size of data are you writing?
Finally perhaps the system is locked down for a good reason and maybe you could find a more permissive system to use for your purposes. It sounds unusual to not let a user write to any file.
Answered By - WorkingMatt Answer Checked By - Marilyn (WPSolving Volunteer)