LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-04-2007, 04:51 PM   #1
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 258

Rep: Reputation: 37
Permissions...Permissions


Hi Folks
To allow me to run a program I fetched as a tar.gz archive, then compiled and installed, I have needed to deliberately set the access permissions for the /usr/local/share folder and everything in it so that Owner, and Group, and Others (ie. everyone!) "Can View and Modify Content"

I know there must better way, because 'Group' and 'Others' were probably originally set to "Forbidden" for very good reasons.

The Ownership of /usr/local/share is User: 501, and Group: users, as happens in a standard Debian 'Etch' installation.

The actual install went OK, using ./configure, and 'make'. I needed to su (become root) to do the 'make install' bit. The problem arose when I found the program would run only when invoked from a root terminal, that is - until I messed with the permissions.

What is the right way to do this?

Thanks

Last edited by GTrax; 09-04-2007 at 04:53 PM.
 
Old 09-04-2007, 06:34 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by GTrax View Post
Hi Folks
To allow me to run a program I fetched as a tar.gz archive, then compiled and installed, I have needed to deliberately set the access permissions for the /usr/local/share folder and everything in it so that Owner, and Group, and Others (ie. everyone!) "Can View and Modify Content"

I know there must better way, because 'Group' and 'Others' were probably originally set to "Forbidden" for very good reasons.

The Ownership of /usr/local/share is User: 501, and Group: users, as happens in a standard Debian 'Etch' installation.

The actual install went OK, using ./configure, and 'make'. I needed to su (become root) to do the 'make install' bit. The problem arose when I found the program would run only when invoked from a root terminal, that is - until I messed with the permissions.

What is the right way to do this?

Thanks
You probably only needed to give group and others execute permission. You probably did not need to give group and others read and write permissions. What is the name of the program?

----------------
Steve Stites
 
Old 09-05-2007, 08:10 PM   #3
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 258

Original Poster
Rep: Reputation: 37
Thanks for the reply.

The program is 'gpsk31', which is a phase shift digital communication mode used by radio amateurs that has a reputation for being efficient, low bandwidth relatively interference-proof and reliable.

I could have installed it using Synaptic, but my interest is not in using it for communication. It is because it has a GTK+ graphical interface that includes pushbutton widgets, real-time phasor (amplitude and angle) display, a colour keyed signal spectrum waterfall graph, real-time fast Fourier transform DSP functions processing signals via soundcards, file access routines, user configuration,and more.

I thought it a good place to go peeking into what has to be quite competent source code. This is not to imply I am yet in that league, but I can be curious, and I was a bit in awe. This is the territory of full skills in Xlib, GTK+, M4, Python/Perl, G++, C, and regular expressions.

Getting back to permissions - OK, one can give 'group' and 'others' execute permission. I guess I must have let a key concept slip here. I thought I was a 'user', not a 'group' or even an 'other'. I thought root could set a user to be a member of a 'group' so that he could do whatever that group exists to do. I then find a real long list where even bits of hardware seem to be 'users'. Thats OK - if I just keep reading and peeking, I will get it figured.
 
Old 09-05-2007, 08:19 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The /usr/local/share/ directory should have global execute permissions to allow any user to enter it. However it should not have global write permissions. The user and group owners should both be root. Other should not have write permissions. For one thing, this is a general folder where other software packages (from tarballs) will be installed.

Usually /usr/local/ is the base install directory for tarballs. Commands are usually copied to /usr/local/bin/, and libraries to /usr/local/lib, etc. Any user mode files saved from using the program should be saved in your home directory.

Check the contents of the "make install" target in the Makefile file. You can see which files are saved where.

Also make sure that /usr/local/bin is in your PATH variable. If not add "export PATH=$PATH:/usr/local/bin" to your ~/.profile file if you use bash as your default shell.

Last edited by jschiwal; 09-05-2007 at 08:40 PM.
 
Old 09-06-2007, 03:19 PM   #5
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 258

Original Poster
Rep: Reputation: 37
My thanks jschiwal for setting it out like that.

While I have been meddling with various Linux distros, and (slowly) losing a DOS/Windows legacy that stalled at Windows 2000, I have tended to slap on any strategy that worked, all the time being aware it could be unwise.

There will come a point when I have to set up a Linux box that might well be an internet connected gateway with mail and print services. I am just going to have to get used to not spreading permissions around like candy at a kiddies party.

G
 
Old 09-06-2007, 08:03 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might want to read through the documentation for the RPM command. Often a package such as filesystems will setup many of the system directories such as /usr/local. You can use the rpm command to find out if this is the case for rpm based distros, such as SuSE.
Code:
rpm -qf /usr/local
filesystem-2.4.0-1
[jschiwal@delllap ~]$ rpm -qV filesystem
On this Fedora Core laptop, /usr/local is created by the filesystem package. The -qV option shows that the permissions were not altered.
You can use the --setperm or --setugids options to fix permissions and group ownerships of the files that a package supplies.

I don't use debian, but it's package program may have similar options.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions R4z0r Linux - General 3 07-23-2006 08:17 AM
Permissions Help carlosinfl Linux - General 10 10-18-2005 01:05 PM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 04:16 AM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration