Permisson denied in opening Folders

I have installed an app, and I am not able to open it
i able to access it only on root
I have tried every thing I could find on internet, but this thing isn’t solving

here is the screenshot

denied2

please help me
thanks

Which one, from where?

You’re clearly using Xfce, I’ve removed your extraneous tags.

1 Like

Like @Yochanan asks, was this a package from the AUR that deliberately mucks up the permissions for /opt?


EDIT: See below post by @maycne.sonahoz

1 Like

Given ownership to root, i’d say superuser privileges were used to “install” in the home directory – which then shouldn’t have been needed.

@ayush222006 Please detail what you tried to install, and how.

This makes me concerned, since a package should not install like this.

I have installed an app known as XAMPP
and I am not able to change anything in that folder
and I am not even able to change it’s location

NO I haven’t done anything

I just tried any possible solutions I could get online But none of them worked

I CORRECTED THE COMMANDS YOU HAVE GIVEN ME AND USED THEM /home/ayushk/
and the cross sign I was getting beside the folder icon disappeared

BEFORE = opt error

AFTER USING COMMANDS = opt

https://www.apachefriends.org/index.html
the name of the app is XAMPP
I tried to install this app using pacman, and it is too giving me errors

From the documentation, xampp should have been installed in /opt/lampp, not ~/opt/lampp. So something went wrong, but support should be sought at the devs.

The xampp package being in AUR, you cannot use pacman to install it. Prefer using a package manager with AUR support, such as pamac:
pamac build xampp

See also the relevant documentation: XAMPP - ArchWiki

4 Likes

I’ve marked this answer as the solution to your question as you made a mistake and it’s better now to undo what you did and do it correctly as per:

because this:

is wrong too and you are digging a deeper and deeper hole that you won’t be able to climb out of pretty soon except by wiping your entire system and starting from scratch.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or :heart: or :+1: if you agree)

:innocent:
P.S. In the future, please don’t forget to come back to your question after your issue has been solved and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

Like @maycne.sonahoz wrote, use Pamac to build/install xampp from the AUR.

The PKGBUILD reveals that it insalls to /opt/ (not $HOME/opt/)

local _xampp_root='/opt/lampp'
1 Like

Thanks bro for the command
APP INSTALLED SUCCESSFULLY in this /opt/lampp/ location
without any error :grinning: :grinning: :grinning: :grinning:
but I am still not able to add any file/folder in that app folder
I added the folder into the VS Code, to create a new, folder inside it for the project, but It showed me this

The properties of the folder is showing this

denied2

this app is by default installing in this location and also there is no option for custom installation

1 Like

Leave the /opt/ folder alone. It’s an alternative path for /usr/ (which is the official standard), depending on the decision of the package maintainer. Some PKGBUILDs will use /usr/ instead, to comply with the standards of applications installed via the official repositories.

/usr/ and /opt/ are akin to the “Program Files” folder under Windows. They’re not meant to store your user’s files, documents, custom configurations, projects, etc. Those types of things should stay within your /home/username/ directory.

1 Like

Can you tell me the reason
in windows there is error like this
VS Code is very easily adding files to that folder
I am not that tech-savvy (a newbie)
that’s why I am asking it

thanks

That is because it’s owned by root and should be considered as “sacred”, but as you seem to be a dev, this is how you copy files in there:

sudo cp --recursive ~/Documents/Source/MyApp/*  /opt/lammp/

Where:

  • cp is similar to xcopy
  • ~ means “my home directory”
  • /Documents/Source/MyApp/ the path to your project source
  • /opt/lammp/ The sacred directory…

And if you don’t know what recursion or * is, you’re faking that you’re a dev! :joy:

As you also seem to be very new to Linux, please read this as well:

(All of it! It will save you tons of time afterwards and will prevent you from… erm… doing dumb things!)

:grin: :+1:

You may also have alternatives depending on how you intend to develop/publish your website:

  • add a document root directory where you already have writing rights (like in your home): XAMPP - ArchWiki
  • publish through your IDE
  • :open_book:
1 Like