tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error while changing file’s mode when saving file with ACL permissio


From: Michael Albinus
Subject: Re: error while changing file’s mode when saving file with ACL permissions
Date: Wed, 17 Apr 2024 19:00:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Tijs Mallaerts <tijs.mallaerts@gmail.com> writes:

> Hi Michael,

Hi Tijs,

[Pls keep keep tramp-devel@gnu.org in Cc, for the archives]

> Here is the output of the tramp debug buffer:

Well, let's see. (Next time pls send it as attachment, sending it as
plain text adds line formatting, which makes it hard to read)

> 18:37:21.563273 tramp-do-copy-or-rename-file (0) # Copying
> /scp:user@aaa:/var/www/aaa/index.htm to
> /mnt/encrypted1/tmp/emacs-auto-save/!scp:user@aaa:!var!www!aaa!index.htm~...done

This is the auto-save file, which succeeds.

> 18:37:21.565837 tramp-send-command (6) # setfacl --set-file=-
> /var/www/aaa/index.htm <<'5facc8e89585e10211c9db6e2745622c'
> user::rw-
> user:apache:rwx
> user:user:rwx
> group::r-x
> mask::rwx
> other::r--
>
> 5facc8e89585e10211c9db6e2745622c
> 18:37:21.620609 tramp-wait-for-regexp (6) #
> ///9d7bf6c80cc21776a3aafba01457c424#$
> 18:37:21.620812 tramp-send-command (6) # echo tramp_exit_status $?
> 18:37:21.656831 tramp-wait-for-regexp (6) #
> tramp_exit_status 0
> ///9d7bf6c80cc21776a3aafba01457c424#$

setfacl sets the ACL's for the given file. It returns exit code 0,
meaning it has succeeded. And the ACL's look normal.

> 18:37:21.657544 tramp-send-command (6) # chcon --user=unconfined_u -
> -role=object_r --type=httpd_sys_content_t --range=s0
> /var/www/aaa/index.htm 2>/dev/null; echo tramp_exit_status $?
> 18:37:21.688826 tramp-wait-for-regexp (6) #
> tramp_exit_status 0
> ///9d7bf6c80cc21776a3aafba01457c424#$

chcon sets the SELinux security context, also successful.

> 18:37:21.690019 tramp-send-command (6) # chmod  674
> /var/www/aaa/index.htm 2>/dev/null; echo tramp_exit_status $?
> 18:37:21.815967 tramp-wait-for-regexp (6) #
> tramp_exit_status 1
> ///9d7bf6c80cc21776a3aafba01457c424#$

And now chmod 674 fails. Unfortunately, we don't see the reson (stderr
is redirected to /dev/null).

Could you please try on the remote machine user@aaa in a shell the
command:

--8<---------------cut here---------------start------------->8---
# chmod  674 /var/www/aaa/index.htm; echo tramp_exit_status $?
--8<---------------cut here---------------end--------------->8---

What do you see?

> Thank you for checking!
> Tijs

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]