$ scp 2.begin.pl fred@164.90.158.33:/opt/scripts/dev
scp: /opt/scripts/dev/2.begin.pl: Permission denied
$ scp 2.begin.pl root@164.90.158.33:/opt/scripts/dev
2.begin.pl 100% 1011 12.7KB/s 00:00
$
####
$ ssh root@206.189.67.44
root@206.189.67.44's password:
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-45-generic x86_64)
##
##
fred@fourth:~$ sudo groupadd mygroup
[sudo] password for fred:
fred@fourth:~$ sudo usermod -a -G mygroup fred
fred@fourth:~$ sudo usermod -a -G mygroup root
fred@fourth:~$ getent group mygroup
mygroup:x:1001:fred,root
fred@fourth:~$
fred@fourth:/opt$ sudo chown root:mygroup scripts
fred@fourth:/opt$ ll
total 16
drwxr-xr-x 4 root root 4096 Dec 30 04:10 ./
drwxr-xr-x 19 root root 4096 Dec 2 20:03 ../
drwxr-xr-x 4 systemd-coredump root 4096 Sep 26 2020 digitalocean/
drwxr-xr-x 5 root mygroup 4096 Dec 30 04:13 scripts/
fred@fourth:/opt$ sudo chmod 770 scripts
fred@fourth:/opt$ ll
total 16
drwxr-xr-x 4 root root 4096 Dec 30 04:10 ./
drwxr-xr-x 19 root root 4096 Dec 2 20:03 ../
drwxr-xr-x 4 systemd-coredump root 4096 Sep 26 2020 digitalocean/
drwxrwx--- 5 root mygroup 4096 Dec 30 04:13 scripts/
fred@fourth:/opt$
##
##
fred@fourth:/opt/scripts/dev$ crontab -e
no crontab for fred - using an empty one
crontab: installing new crontab
fred@fourth:/opt/scripts/dev$ crontab -l
# Edit this file to introduce tasks to be run by cron.
...snip
# m h dom mon dow command
0 6 * * * /opt/scripts/dev/2.begin.pl