Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symlinked items don't preserve file permissions #92

Closed
varemenos opened this issue Apr 18, 2014 · 5 comments
Closed

symlinked items don't preserve file permissions #92

varemenos opened this issue Apr 18, 2014 · 5 comments
Assignees

Comments

@varemenos
Copy link

The file that get symlinked from a castle don't preserve their file permissions (for example one of my file had "600" but it got turned into "777")

ps: sorry for creating so many issues in such a short time but I'm really loving the idea behind homeshick and I just can't enjoy it enough while these "bugs" exist.

@squaresurf
Copy link
Contributor

I've experienced this issue as well. I have my ~/.ssh/config file in a castle and whenever I edit it it breaks my ssh since I need to chmod it to 600. I'll look into this and see if I can fix it.

@andsens
Copy link
Owner

andsens commented Apr 21, 2014

The file that get symlinked from a castle don't preserve their file permissions (for example one of my file had "600" but it got turned into "777")

Well, yeah. :-)
Symbolic links don't need permissions in and on themselves. They are only pointers, so whatever permissions are set on the original file, will be preserved when accessing the symlink, you just can't see those permissions when you run ls on the symlink.

I just can't enjoy it enough while these "bugs" exist.

Airquotes indeed. So far you haven't reported any bugs :-)

@andsens andsens closed this as completed Apr 21, 2014
@varemenos
Copy link
Author

whatever permissions are set on the original file, will be preserved when accessing the symlink

Some CLI tools don't see it that way, for example the ssh key agent on linux distros (like Ubuntu and Fedora). Because of the symlink's 777 permissions the agent ignores the key

@squaresurf
Copy link
Contributor

This sounds like a similar issue I had with the ssh config. It ended up being an issue with git and not homeshick. See if something like this would fix your key issues: #93 (comment)

@andsens
Copy link
Owner

andsens commented Apr 21, 2014

Some CLI tools don't see it that way, for example the ssh key agent on linux distros (like Ubuntu and Fedora). Because of the symlink's 777 permissions the agent ignores the key

That's just not true. I tried it out 5 minutes ago (on debian, which runs the same openssh every other distro does), something else must be wrong on your setup (maybe your .ssh/ is world writeable).

p.s.: If this really were the case, enforcing the permissions would make no sense at all. They are enforced to make sure that nobody but you can change the contents of e.g. the authorized_keys file, what good do the permissions of the symlink do in that case? They have no say in whether you can read, edit or execute a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants