Will the program installed in a folder function properly if I remove the write permission in linux? [closed]

StackOverflow https://stackoverflow.com/questions/19440432

Question

I have a user account on a cluster( a server), and can only install program like python on the home folder. In case I might accidentally delete the bin, lib, share,include folders coming with the installation of python on the home folder. I change the permissions of the above folder like this

chmod -w folder

but I am worried when the program need to write/delete some files of the folders, it might not function because the removal of write permission. Am I right? or I the run, including write files in the folder, of a program have permissions different than the permission of user.

BTW, is there a way to hide the folders without changing the names?

Was it helpful?

Solution

Wouldn't this stop python from running all together? For example:

$ cd ~
$ mkdir -p python/bin/
$ echo "echo 'hi'" > python/bin/python
$ python/bin/python
hi
$ chmod -x python
$ python/bin/python
bash: python/bin/python: Permission denied

As for your second question, no, there is no other way to selectively hide one folder without changing the name.

Edit: re-reading, I may have mis read what you were saying about the folders. You could always apply a "chmod -r folder" and nothing inside will be visable. This is not hiding it, just turning off permissions to view it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top