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

Directory Access? #185

Closed
coffseducation opened this issue Aug 30, 2023 · 2 comments
Closed

Directory Access? #185

coffseducation opened this issue Aug 30, 2023 · 2 comments

Comments

@coffseducation
Copy link

Yunohost documentation:

The IFM is usually locked to it's own directory (/home/yunohost.app/ifm), so you are not able to go above. You can change that by setting env[IFM_ROOT_DIR] = /home/yunohost.app/ifm in the PHP config /etc/php/8.0/fpm/pool.d/ifm.conf L.434 with the help of this documentation.

When change env[IFM_ROOT_DIR] = /home/yunohost.app to just /home/ or /var/www/ then then ifm does not itself change. The default directory stays the same - at least appears to!
What am I missing?
How can I get access further up the filesystem?

Thanks!

@coffseducation
Copy link
Author

Ok, apologies.
After a reboot I have access - sort of!
I now have the filesystem access higher up - but can drill down only so far!
eg I can get to /opt/yunohost but then cannot enter the searxng directory!
A permissions issue?
rwx r-x ---
How do I change permissions so IFM can access all?
thanks

@misterunknown
Copy link
Owner

Hi,

well yes, that sounds like a permission problem. This technically has nothing to do with IFM itself. To solve this problem you first have to determine as which user PHP is running. I'm not familiar with yunohost, so I can't really help you there. If it's an apache2 webserver with PHP module, the user is mostly "www-data", but that's a wild guess. If they use php-fpm it could be literally any user. The simplest way to check this is to create a file in a directory you can write to, and check the ownership of that file.

Even if you know the user, it's not simple to get universal access. You can't just randomly chown files and directories, if you don't know exactly what you are doing, because that can break things fast. One way could be to add that user to the corresponding group if the permissions are rwx r-x ---. Another way is to set a filesystem ACL. FInally it should also be possible to change the user as which PHP is running entirely, but this has also major implications on potential other apps, running on the same webserver.

Cheers,
Marco

This issue was closed.
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

2 participants