Hot answers tagged

3

Running untrusted software as a new user is a good start, but it may not be enough. A lot of files and devices you may consider sensitive are world-readable. Even as an unprivileged user, you can extract a lot of information out of a system (typically you can read /etc for a start). You may not have your own stuff configured properly. For instance, have ...


3

Three quick steps Add your user to the www-data group sudo usermod -a -G www-data username Change the owner of /var/www sudo chown -R username:www-data /var/www Change the permissions recursively on /var/www sudo chmod -R 644 /var/www NB: Replace username in the commands with your username.


3

You have two problems: /etc/dpkg/dpkg.cfg.d/multiarch file is being opened by the shell as unprivileged user before the echo command runs, hence the permission error as only root should be able to create the file or write in it. The sudo is only being applied to echo command. The string foreign-i386 architecture is not correct for enabling multiarch ...


3

Repeat after me: Running ANY permission command on / without knowing exactly what you're doing is a great way to break your system. Even if you know what you're doing, it's still probably the wrong thing to do. In your case, the command won't work because it's the wrong one to start. Secondly, groups are a very valid Linux construct of users, and blocking ...


1

Relying on my own Google-fu, I was able to find this that describes your issue similarly. Try the following: chmod 755 -R /opt/lampp/phpmyadmin To fix the permissions of phpmyadmin.


1

The best way (my opinion) is to use a different user for apache (www-data, apache) and use the following method: create an FTP location that has the subdirectories of your website. Chroot this location. For traceability I would use different users if there is more than 1. setup a cronjob (/etc/crontab with the apache user as the one executing this) with a ...


1

You can try a few steps: Check if it can find its libraries: ldd /path/to/couchpotato. If you installed it in a non-standard patch make sure it picks its libraries from where you installed it rather than from /usr/lib. Run the program in the foreground: /path/to/couchpotato. If necessary add a parameter or 2 after checking the manual. It may print an error ...


1

You need to change the permissions of that folder to gain access to write files. Here is the GUI method. Only use terminal to open Nautilus with root permisions. There is a risk opening Nautilus as root. Read it here. Open Terminal type sudo nautilus hit enter Navigate to the target file or folder you want to change permissions (/var/www) Right click the ...


1

In Ubuntu, the default SSH policy is "Deny root login via SSH directly, except by SSH Key Authentication only." This is done by the PermitRootLogin without-password line of /etc/ssh/sshd_config. You can enable root password login over SSH by changing that line to say PermitRootLogin yes. However I must caution you - this permits brute forcing attempts ...


1

Make sure Apache has permissions to write to directory where you are trying to create a new directory. F.e. if your script is calling mkdir('/var/www/subdir/newdir'), run the following: Give apache ownership: sudo chown www-data:www-data /var/www/subdir Make directory writable: sudo chmod 770 /var/www/subdir


1

You had a NOPASSWD rule applied to your user in some file in /etc/sudoers.d. Use sudo grep NOPASSWD /etc/sudoers.d -R to find out which. Your /etc/sudoers is not the default, however. The default sudoers can be obtained by looking at the sudo package: $ apt-get download sudo Get:1 http://mirror.cse.iitk.ac.in/ubuntu xenial-updates/main amd64 sudo amd64 1.8....



Only top voted, non community-wiki answers of a minimum length are eligible