-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[ERROR ] [Errno 13] Permission denied: '.' #31507
Comments
@rjc, thanks for reporting. Is it possible for you to reproduce this with the latest stable release of salt? It can be obtained from the saltstack repo: https://repo.saltstack.com/#ubuntu. |
Yep, the same thing :^) |
This is not a bug. This is expected behavior with sudo on an nfs mount exported without root privileges. If the nfs share is exported with root_squash (which it most likely is based on the behavior) then the uid 0 of the root user on the client machine is mapped to an unprivileged user. Therefore root doesn't have permission. Since it is a home directory of a user, then no one but the owner is going to be able to access the home directory at least from that client machine. Specifically, when you run salt-key -L, it looks for a file called Saltfile in your current working directory and uses the cwd for the keys directory. Since root cannot access Saltfile or the directory, you get the error permission denied. The fix on the salt side is to specify the gen-key-dir outside of this privileged NFS mount: This will solve your issue. The only fixes I see on the infrastructure side are either to export the nfs mount with no_root_squash (umount home directory and mount again after the change) or make sure the current working directory is not a NFS share with no root permissions. |
Hi Rich, Thanks for taking the time to reply. In terms of I'm well aware how This issue is strictly related to There are plethora of programs which complain about not being able to read from, or
or:
So no, changing Also, the option you speak of simply doesn't make sense in its current state:
as As it stands, the bug is still there - Best regards, Raf |
Has there been any movement regarding this issue? ... it's been two years ;^) |
Hi there, Has there been any movement on this? Cheers, Raf |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
It would be great if, rather than marking it as stale, this eventually got fixed! :^) |
Thank you for updating this issue. It is no longer marked as stale. |
The Core team won't be able to get to this in Aluminium, moving it back into planning for another release. |
Closing this due to age, the old version of Salt and Python 2. |
Why!? This has absoletely nothing to do with Python version - the error is exactly the same:
|
Expected Behavior
run in user's
$HOME
directory, which resides on NFS and has strict access permissions (0700
) should still display the list of keys.Actual Behavior
The above command run in user's home directory with very strict access permissions and which residing on NFS, causes the error below:
Steps to Reproduce Issue
0700
permissions on user's$HOME
directories.cd $HOME && sudo salt-key -L
- user obviously has local admin rights viasudo
.cd / && sudo salt-key -L
works as expected and obviously doesn't display the message as there are no NFS access constraints on local/
, which is then the$PWD
.Versions Report
* Provided by running
salt --versions-report
*Relevant Logs, Configs, or States
** If not already provided above, please post any additional
information that can help us reproduce your issue such as
commands run with
-l debug
. Be sure to remove anysensitive information. **
The text was updated successfully, but these errors were encountered: