Ask Your Question
0

What is the correct way of using /opt/ ?

asked 2014-05-12 03:30:07 -0500

Steffen Christensen gravatar image

updated 2014-09-28 23:56:32 -0500

mether gravatar image

Hi, have been wondering if I'm using /opt/ the correct or intended way.

I know that it's supposed to be the directory for all third party applications which contains all it's own dependencies, right?

So, I'm a java developer and therefore have multiple version of Eclipse on my system, each one of those I have downloaded as tar.gz from Eclipse.org and extracted them to /opt/. But as the directory by default owned by root, I simply:

su 'chown USERNAME:USERNAME eclipse/ -R'

But is this an acceptable way of using /opt/ or is it considdered wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-05-12 05:13:44 -0500

cobra gravatar image

The FHS makes no mention of permissions:

http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES

You do, of course, need to apply the necessary permissions to allow users to read and/or execute such files as are necessary to them - but they don't really need to -own- any of them, unless there are specific reasons. Remember that this area is for shared applications, open for all users.

It may be enough to do

chown root.users <directory>

And set any executables files as group executable within those sets. If it's just you using this system, then you're fine doing whatever works best for you.

If your system is shared, then getting these permissions right might be more important, but the same principles apply if you want to do this 'right' - all you're trying to do is stop your regular users from writing or changing these files accidentally. But if you have the original tar files, it's easy to restore stuff if it gets broke.

I use Eclipse installed from the repositories, I think (iirc) that the binaries are in the rpmfusion repository.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-12 03:30:07 -0500

Seen: 437 times

Last updated: May 12 '14