A short introduction about myself
I have just installed Feren OS. As a webdeveloper I do work with Linux and Unix commandline on a daily basis, but only for quite simple stuff. So I still consider myself a Linux noob.
Edit: This question has now been downvoted once. Please consider to let me know what is wrong with it, if you downvote it.
My problem
First of all I have installed Apache2 from commandline (using apt). I have created a fully functioning working website in /var/www/projects/some_website/web. This part is what I am familiar with for my daily job as well.
I have also installed PHPStorm (flatpak) from the store. The store itself is (according to it's about box) a Feren OS custom made store. However, I'd say that has nothing to do with the problem I'm having.
In Feren OS I am logged in as user "paul".
Now when - as user "paul" - I open up the terminal, I can go anywhere. For instance I can go to "/var/www". I can create directories there, chown them, etc. Like I said, this part I am familiar with.
However from PHPStorm I can go to "/var", but there I can't see all the directories. Even when I type "/var/www" in the address box there, it can't go there.
As a comparison I have also opened text editor Kate. This program can access "/var/www" like I would expect it to.
What I tried to fix it
The answers I found on the internet mentioned mainly that the user should be added to the www-data group and /var/www/ should be chowned by that group.
For example this one
While I consider this solution nonsense in my case, I did try it. I consider it nonsense, because other applications running under the same user can access the directory. Ofcourse I can be in the wrong here, so please let me know :)
To be sure I have added user "paul" to the "www-data" group and I have chowned /var/www to that group as you can see in the attached screenshot.
Another possible solution I found is installing PHPStorm via snap instead. I haven't tried that yet, because I would like to understand what I doing wrong first.
Last but not least I have uninstalled the flatpak package in the Feren OS store and then re-installed the flatpak package from commandline:
flatpak install PhpStorm
This also does not change anything.
My questions
1. What is the difference between PHPStorm and Konsole and Kate, that makes that PHPStorm cannot access /var/www/, while all the other tools can.
- What should I do to fix this problem?
Investigation
As asked in the comments I have checked what user is running PHPStorm:
ps -ef | grep -i phpstorm
paul 2241 1332 0 13:09 ? 00:00:00 /usr/libexec/flatpak-bwrap --args 31 phpstorm
paul 2267 2241 0 13:09 ? 00:00:00 /usr/libexec/flatpak-bwrap --args 31 phpstorm
paul 2268 2267 0 13:09 ? 00:00:00 /bin/sh /app/extra/phpstorm/bin/phpstorm.sh
paul 2309 2268 99 13:09 ? 00:00:19 /app/extra/phpstorm/jbr/bin/java -classpath /app/extra/phpstorm/lib/bootstrap.jar:/app/extra/phpstorm/lib/extensions.jar:/app/extra/phpstorm/lib/util.jar:/app/extra/phpstorm/lib/jdom.jar:/app/extra/phpstorm/lib/log4j.jar:/app/extra/phpstorm/lib/trove4j.jar:/app/extra/phpstorm/lib/jna.jar -Xms128m -Xmx968m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djdk.attach.allowAttachSelf=true -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -Dsun.tools.attach.tmp.only=true -XX:ErrorFile=/home/paul/java_error_in_PHPSTORM_%p.log -XX:HeapDumpPath=/home/paul/java_error_in_PHPSTORM.hprof -Didea.paths.selector=PhpStorm2020.1 -Djb.vmOptionsFile=/home/paul/.var/app/com.jetbrains.PhpStorm/config/JetBrains/PhpStorm2020.1/phpstorm64.vmoptions -Didea.platform.prefix=PhpStorm com.intellij.idea.Main
paul 2403 2387 0 13:09 pts/1 00:00:00 grep --color=auto -i phpstorm
And as a comparison I have done the same for Kate (which can access the directory):
ps -ef | grep -i kate
paul 2761 1332 4 13:12 ? 00:00:00 /usr/bin/kate -b --tempfile
paul 2767 1271 0 13:12 ? 00:00:00 tags.so [kdeinit5] tags local:/run/user/1000/klauncherkWHCgQ.1.slave-socket local:/run/user/1000/kateencBio.1.slave-socket
paul 2776 1271 0 13:12 ? 00:00:00 file.so [kdeinit5] file local:/run/user/1000/klauncherkWHCgQ.1.slave-socket local:/run/user/1000/kateSKaSMP.2.slave-socket
paul 2780 1271 0 13:12 ? 00:00:00 thumbnail.so [kdeinit5] thumbnail local:/run/user/1000/klauncherkWHCgQ.1.slave-socket local:/run/user/1000/kateVcVjeG.4.slave-socket
paul 2791 2387 0 13:12 pts/1 00:00:00 grep --color=auto -i kate
ps -ef | grep -i phpstorm