I wrote a script that should allow me to create directories with specific permissions on a remote server.
I used the command to execute the script to the remote server:
And I got this answer:
bash: /root/Documents/script: Permission denied Connection to 192.168.159.133 closed.
I'm working on Fedora 20, and the server is on Ubuntu 18.04.1.
I tried to modify the permission on my script document with chmod:
chmod 777 script
At first I tried to execute the script with the SSL connection integrated inside of the script (you can see it in my script).
#!/bin/bash #Connecting to Ubuntu Server #ssh firstname.lastname@example.org #specifying the directory where I want to create my two directories cd /home/stan #Creating the first directory "PublicFolder" and assigning permissions mkdir PublicFolder chmod -R 606 PublicFolder #Creating the first directory "PrivateFolder" and assigning permissions PrivateFolder chmod -R 604 PrivateFolder