tramp-devel
[Top][All Lists]
Advanced

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

Re: Curious permission problem


From: Michael Albinus
Subject: Re: Curious permission problem
Date: Wed, 17 Feb 2010 12:08:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Ole Laursen <address@hidden> writes:

> Hi!

Hi,

> I get a "Wrong type argument: arrayp, nil" error which I traced to the
> fact that for some reason the files on the remote host have the
> permission "---xrwxr--". So there is no read access for the owner.
> This is a bit weird, but it actually works on the remote server (I'm
> logging in as a normal user, owner of the file is root). I didn't
> setup the server end. :)

That's correct. If you are not the owner of a file, but in the same
group, just the group permission are checked ("rwx"):

--8<---------------cut here---------------start------------->8---
slbpky:~> ls -al /tmp/123
---xrwxr-- 1 root root 5 2010-02-17 09:42 /tmp/123*
slbpky:~> cat /tmp/123
456
--8<---------------cut here---------------end--------------->8---

If you are the owner of a file, the owner bits are used for checking
file permissions. And these are "--x":

--8<---------------cut here---------------start------------->8---
slbpky:~> ls -al /tmp/123
---xrwxr-- 1 albinus albinus 5 2010-02-17 09:42 /tmp/123*
slbpky:~> cat /tmp/123
cat: /tmp/123: Permission denied
--8<---------------cut here---------------end--------------->8---

> So tramp transfers the file and makes it unreadable. I guess this
> shouldn't happen. I'm not sure why I can't read the file when I'm
> still in the group. But I can't. I'm on Ubuntu, by the way. A simple
> check to make sure owner always gets read permission would probably
> suffice?

When Tramp copies a file, it preserves file permissions and
timestamps. Usually, this is desired. But in the file insertion case via
a temporary file, the appended patch might be useful (towards the trunk
in Tramp's CVS repository).

Best regards, Michael.

Attachment: txtraPsUc9MsY.txt
Description: Text Data


reply via email to

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