LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 05-01-2007, 06:48 AM   #1
G00fy
Member
 
Registered: Jul 2004
Location: Herent, Belgium, Europe, Earth
Distribution: Ubuntu 7.04
Posts: 102

Rep: Reputation: 15
Question chmod a file requires root?


Hi,


I am working on a Mac - as I understand it's basically a BSD beneath it - and although I know a little about Linux, I know nothing about BSD.

What I am trying to accomplish is to compile libcurl from source. So I download, I ./configure it and I make it. Then when I enter "make install" it says like "Permission denied" on the file "install-sh". Which is quite logical as the rights are 0644...

So what I tried to do is:
chmod 755 install-sh <- requires root
chmod u+x install-sh <- requires root
chmod +x install-sh <- requires root

The user owning the file is 'steven' (the user I am working under), the group is '5584' (whatever that is), but I know I untarred the libcurl sources into that folder, so I guess that's something like the 'users' group under Linux.


What I want to know is how I can change the rights of this file so I can "make install" without being root.

(btw, the prefix is in my own directory, so no need to be root to install it to the system).


Thanks for any help you could give me.
 
Old 05-01-2007, 09:07 AM   #2
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: OpenBSD
Posts: 164
Blog Entries: 1

Rep: Reputation: 30
make install always needs roto privalages under unix, You should really have a look at fink. Its basically an implementation of apt on OSX.
 
Old 05-01-2007, 11:21 AM   #3
G00fy
Member
 
Registered: Jul 2004
Location: Herent, Belgium, Europe, Earth
Distribution: Ubuntu 7.04
Posts: 102

Original Poster
Rep: Reputation: 15
Well, I use "port" (macports), so I guess that's about the same.

And the "make install" does NOT need always root privileges... It only needs that if you want to install into the system. And that's exactly not what I want to do (as pointed out before).


As for this problem... I don't know why, but the GROUP was 'steven', the user was 755 (dunno, maybe I did a chown instead of a chmod command before?)


Thanks again!
 
Old 05-04-2007, 06:25 PM   #4
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: OpenBSD
Posts: 164
Blog Entries: 1

Rep: Reputation: 30
did you unpack the tarball(or just download) as root? This can have problems, but i can't see why it would. This is quite out of my league in this sense, the only thing i can think of is either starting again from scratch, or find a binary of lib curl
 
Old 05-04-2007, 10:03 PM   #5
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Quote:
The user owning the file is 'steven' (the user I am working under), the group is '5584' ... I don't know why, but the GROUP was 'steven', the user was 755.
The numbers are the GID (Group ID) and UID (User ID) respectively. The reason they are numbers when you did a file list is because the numbers don't correspond to an actual UID or GID. The UID's are typically listed in /etc/passwd and the GID's are in /etc/group.

You can fix the UID and GID of the directory by:
Code:
$ chown -R steven:stevengroup /path/to/curl-source-directory

$ chown -R steven:stevengroup $HOME/curl-7.16.2
Replace stevengroup for whatever is your group.
Quote:
So I download, I ./configure it and I make it. Then when I enter "make install" it says like "Permission denied" on the file "install-sh". Which is quite logical as the rights are 0644...
I presume you downloaded curl-7.16.2.tar.gz file? I downloaded that file, untared it, and was able to install it in my $HOME directory without problem. The install-sh already had the executable bit set so I didn't have to do a chmod.
Code:
$ cd $HOME
$ tar xzf curl-7.16.2.tar.gz
$ cd curl-7.16.2
$ ./configure --prefix=$HOME/curl
$ make
$ make install
Quote:
Then when I enter "make install" it says like "Permission denied" on the file "install-sh".
Once you have the correct UID and GID set on the curl directory list, hopefully you won't get the permission denied error.

Last edited by bsdunix; 05-04-2007 at 10:20 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NFS Root setup - can't log in as root after CHMOD ? gallwapa Linux - General 1 04-02-2007 04:31 AM
no prompt for root password when program requires su privileges sgmeunier Linux - Software 2 06-26-2006 01:31 AM
Adobe Acrobate Reader Requires A Plugin-That Requires Open LDAP That Requires Berkely Old_Fogie Slackware 10 05-08-2006 05:04 AM
Windows partition requires root permissions- chmod question Garibaldi3489 Slackware 19 05-16-2005 01:52 AM
Fluxbox startup script.......... App requires root. DraaX Slackware 2 11-28-2004 08:27 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 10:20 AM.

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