When I install applications like Android Studio or programs like Oracle JDK in home directory by extracting tar archives, after running the .sh file, they make changes on home directory such as making configuration files and folders. I want to know that can they access other system folders in my root directory and make changes in them?

  • They can make any modifications to anything they please that you can from your personal account. – You'reAGitForNotUsingGit Aug 11 '16 at 18:29

They can, but the consensus is that they should not.

Installation from tar.gz should be of 2 kinds of installations. an installer or install script that offers using ...

  1. /opt/ as the installation path and then put everything except a symlink in /etc/ to the binary in /opt/ so a service gets started on boot. This one requires sudo and tends to be for larger projects (think jasperserver, a mysql from source) where more than 1 user use the software or where the software is a server.

  2. /home/$USER/ and a subdirectory in there named after the software where everything gets installed there. This one does not require sudo and should not install anything outside of your home.

    When you use this kind of installation and the installer asks for your sudo password this is a red flag. You need to stop and investigate. List the installer on screen and check why it is asking for it. Or ask on AskUbuntu ;)

I have yet to see software that did not follow this.

Only installers made for that specific OS (.DEB for Ubuntu/Debian, .RPM for Redhat etc.) should use the specific directories described in the Linux Filesystem Hierarchy.

  • So tar.gz programs extracted in /home/$USER/ cannot access outside of my home without my password? – Dante Aug 11 '16 at 18:49
  • 1
    Yes. That software can only go to places your user can go. So outside /home/$USER/ most places are not allowed. Only if you mess up your permissions installing software can be done without a sudo password (you could install apache and do a chmod 777 /var/www/html and any software can screw your system but we do not do that ;-) ) – Rinzwind Aug 11 '16 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.