-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use sudo for reading ffxiv pid environ #30
base: xlcore
Are you sure you want to change the base?
Conversation
For reasons I can't quite find on the internet, I was unable to read the environ file from processes created from xlcore (AUR), despite the file being owned by my user, having 0400 permissions. The only thing I could find online was [a RedHat KB entry][1], which I can't read as I don't have a subscription. The fact that article exists makes me think that there's something in the kernel that prevents this, potentially related to cgroups, but I don't know enough about how xlcore/wine work to know if any of that could be related. I can confirm that this seems specific to the FFXIV process as kicked off by xlcore from AUR on my machine -- I can enumerate environments of other processes just fine... So I'm really not sure what's going on [1]: https://access.redhat.com/solutions/1446823
I can't think of a reason this would be happening unless XL/FFXIV was running under another user or group from your normal terminal user. It works fine for me with xivlauncher-git from AUR on both my desktop linux install and my steam deck. Is it possible you have selinux or some other analog enabled which is blocking this instead? |
Yea... I'm pretty stumped too to be honest. I don't think I have selinux on but, apparently, checking would be more work than I think it's worth given that Just to make sure i'm not crazy, here's what I'm seeing:
|
@valarnin just cleaning up, what do you want to do with this PR? Close it until someone else experiences the problem? |
echo "Failed to cat /proc/$FFXIV_PID/environ. This can sometimes happen if your operating system only allows this action by root. We will try to rerun this command with sudo. You may be prompted for your password. The commands we will run with sudo are:" >&2 | ||
echo >&2 | ||
echo " sudo cat /proc/$FFXIV_PID/environ" >&2 | ||
sudo cat /proc/$FFXIV_PID/environ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should display this message with a different color to indicate that it's more important. Use warn
.
Additionally, we should always prompt before running something as sudo, so that the user can interrupt if it doesn't look correct.
Finally, a minor grammar correction.
echo "Failed to cat /proc/$FFXIV_PID/environ. This can sometimes happen if your operating system only allows this action by root. We will try to rerun this command with sudo. You may be prompted for your password. The commands we will run with sudo are:" >&2 | |
echo >&2 | |
echo " sudo cat /proc/$FFXIV_PID/environ" >&2 | |
sudo cat /proc/$FFXIV_PID/environ | |
warn "Failed to cat /proc/$FFXIV_PID/environ. This can sometimes happen if your operating system only allows this action by root. We will try to rerun this command with sudo. You may be prompted for your password. The command we will run with sudo is:" | |
echo >&2 | |
warn " sudo cat /proc/$FFXIV_PID/environ" | |
PROMPT_CONTINUE | |
sudo cat /proc/$FFXIV_PID/environ |
For reasons I can't quite find on the internet, I was unable to read the environ file from processes created from xlcore (AUR), despite the file being owned by my user, having
0400
permissions.The only thing I could find online was a RedHat KB entry, which I can't read as I don't have a subscription. The fact that article exists makes me think that there's something in the kernel that prevents this, potentially related to cgroups, but I don't know enough about how xlcore/wine work to know if any of that could be related.
I can confirm that this seems specific to the FFXIV process as kicked off by xlcore from AUR on my machine -- I can enumerate environments of other processes just fine... So I'm really not sure what's going on