无法通过 SCP 编辑/移动/传输文件到 Linux 服务器

无法通过 SCP 编辑/移动/传输文件到 Linux 服务器

我有一个运行 Debian 9 的 Linux 服务器,我试图从我的 Windows 机器通过 WinSCP 向其发送/编辑文件。我正在通过 SCP 协议与名为 ASCUSER 的用户验证连接。以下是 ASCUSER 的权限/组信息:

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

这是我试图操作的权限/组访问文件:目录:/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

具体来说是apache2.conf。根据我的理解,所有者(root)和组(root)都应该有权访问该文件,并且鉴于 ASCUSER 是 root 组的一部分,我相信它也应该有权访问。但是,每当我尝试在外部和内部编辑文件,或者尝试收到访问被拒绝错误时:

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`

我不确定此时我缺少什么?

答案1

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

root组有读该文件的权限,但没有写该文件的权限,因此用户ascuser无法编辑该文件。

相关内容