Skip to main content

All Questions

Tagged with
1 vote
1 answer
355 views

sudo mkdir /srv/www permission denied

I'm setting up a new webserver on Debian. As my previous install had everything located in /srv/www I want to use the same setup to avoid rewriting a bunch of config files. However executing mkdir /...
user avatar
0 votes
2 answers
1k views

How to run a remote script with sudo via ssh without entering password

I would like my script to connect to ssh with password, and once connected it will switch to sudo -s and run the mkdir command for the moment I manage to connect to ssh without entering the password ...
Scripting's user avatar
0 votes
1 answer
1k views

sudo mkdir in bash script without password

I need to manually create a directory using the following command in a cronjob and not have to enter in a password: sudo mkdir /fold1/ I have read that I should not edit /etc/sudoers directly. What ...
iso's user avatar
  • 35
1 vote
1 answer
9k views

Sudo mkdir fails due to permission denied error

I've written a script that copies some files from one place to another and since I don't have permissions to the source folder, I tried running it with sudo. The problem is that now the creation of ...
ventsyv's user avatar
  • 1,039