1

I have a Linux server running Debian 9 to which I am trying to send/edit files to via WinSCP from my Windows machine. I am authenticating the connection via the SCP protocol with a user named: ASCUSER. Here is the permission/group information for ASCUSER:

/etc/apache2$ id -nG ascuser
ascuser root adm sudo www-data plugdev netdev lpadmin wwwpub

And here are the permissions/group accesses files I am trying to manipulate: Directory: /etc/apache2

/etc$ ls -l apache2
total 88
-rw-r--r-- 1 root root  7224 Sep 19  2017 apache2.conf
drwxr-xr-x 2 root root  4096 Oct 17  2019 conf-available
drwxr-xr-x 2 root root  4096 Nov 19  2018 conf-enabled
-rw-r--r-- 1 root root  1782 Sep 19  2017 envvars
-rw-r--r-- 1 root root 31063 Sep 19  2017 magic
drwxr-xr-x 2 root root 16384 Mar 11  2020 mods-available
drwxr-xr-x 2 root root  4096 Aug 20  2019 mods-enabled
-rw-r--r-- 1 root root   320 Jul 10  2018 ports.conf
-rw-r--r-- 1 root root   323 Jul 10  2018 ports.conf~
drwxr-xr-x 2 root root  4096 Oct 17  2019 sites-available
drwxr-xr-x 2 root root  4096 Aug 20  2019 sites-enabled

Specifically apache2.conf. From my understanding both the owner (root) and the group (root) should have access to this file and given that ASCUSER is a part of the root group, I believe it should have access too. However anytime I try to edit the file externally and internally, or attempt to I get an access denied error:

Copying file 'a long temporary file address to where windows stores scp related temp files for scp transfer' failed.
scp: /etc/apache2/apache2.conf: Permission denied`

I'm not sure what I am missing at this point?

0

1 Answer 1

2

See

-rw-r--r-- 1 root root  7224 Sep 19  2017 apache2.conf
    ^^

Group root has the permission to read the file but not to write it, so user ascuser cannot edit the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .