LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Permissions Problem? (https://www.linuxquestions.org/questions/linux-software-2/permissions-problem-474367/)

Ariod 08-16-2006 07:16 AM

Permissions Problem?
 
Hi all,

Every once in a while I play poker at PokerRoom.com (using Firefox on FC5) and every time I'm done, a directory gets created in my home directory called Ongame Network. Is there any way I can forbit this from happening?

stress_junkie 08-16-2006 09:03 AM

Unfortunately no. One of the weaknesses of the Unix model of file permissions is that you can always create and modify files in your own home directory. I spent a lot of time trying to create a .bashrc file in a home directory that the owner of the directory couldn't change. I even tried creating a link to a file owned by root in the /etc directory. Nothing prevented my normal user account from modifying the .bashrc file or the link to the file in the /etc directory.

One thing that I have done successfully to prevent unwanted files being created is to change the directory that holds the unwanted files to a link to /dev/null. For example picture viewer software that I sometiems use wants to create a directory ~/.thumbnails. I don't want thumnail versions of the picture files that I look at so I made the ~/.thumbnails directory into a link to /dev/null as follows.

cd
rm -r .thumbnails
ln -s /dev/null .thumbnails

I've done the same thing with the directory ~/.recently-used and other directories that various applications use as a cache.

Of course if your web site stores information that you need to play into this directory turning it into a link to /dev/null could prevent you from playing. If it just uses this directory to keep track of your visits then maybe you can turn it into a link to /dev/null.

That's about all that I can think of to prevent the creation of unwanted files in a directory that your user account owns. If your application is smart enough to check for this it could delete the link and create the directory so, depending on the application's developer, even creating a link to /dev/null may not work.

Ariod 08-16-2006 04:33 PM

Thanks for the extensive reply!


All times are GMT -5. The time now is 11:22 AM.