You are not logged in.

#1 2012-10-18 02:29:01

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Can't execute makepkg due to user permissions

I have been using ArchBang for about a year now and I decided this last weekend to install a true Arch Linux system.  Anyways, I have the base system installed and the basic configuration of the system completed and now I am trying to install yaourt so that I can use it to access the AUR.  I am following the instructions on the AUR wiki for the installation of the yaourt package (i.e. download the tar.gz, extract it, etc.).  The problem that I am having is that I cannot run the

makepkg -s

from my ~/build directory because I am getting a permission error when I try to run it under the user name (johnmichael) I created during the install.  I checked to make sure and the /builds directory is under my user's directory and it is.  Also, I tried running the makepkg command using sudo (I know that this is not a good idea) and it wouldn't let me because of the warning as running it as root.  So now I am in a situation where I can't run the makepkg command at all due to permission issues.

Because of this I did some reading on the Arch wiki and found the

ls -l /home/johnmichael

command to check the ownership of ~/johnmichael and sure enough the output reads

drwxr-xr-r      43295  root root 1355776  Oct 17  18:34  aur-mirror
drwxr-xr-r          4  root root    4096  Oct 18  17:34  builds

indicating that root owns my user home directory?  Is this correct, and if so, why is this the case?  Did I do something wrong when I created my user during the install?  More, importantly how do I fix this so that I can run the makepkg command within my ~/builds directory under my user account?  I read over the wiki for the chmod command but I am still not entirely clear how to fix this.

Offline

#2 2012-10-18 02:37:04

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Can't execute makepkg due to user permissions

This is some very simple stuff that should be easily found on the interwebs.  Look into man 1 chown to find out some info.  While you are at it, you might as well look into man 1 chmod.

You will probably find that although the forum interfaces look very similar, here are archlinux, things couldn't be more different.  You will not find your hand being held though things that the community sees as something that you should be able to find on your own.

That said, I wish you luck.  Enjoy your adventure.

Offline

#3 2012-10-18 02:40:08

headkase
Member
Registered: 2011-12-06
Posts: 2,008

Re: Can't execute makepkg due to user permissions

You should use a helper like cower:

https://aur.archlinux.org/packages.php?ID=44921

As it will simplify things for you.  Read its man page.

Also, the "-s" option is to syncdeps with pacman.  So, if there are any needed dependencies they will be downloaded and installed.  So, you do need super user privileges to use that option.  What you should be doing is this:

1) In the folder with the PKGBUILD, execute "makepkg" - just makepkg, no options.
2) If makepkg complains about missing dependencies, either from the official repositories or AUR then install those separately.
3) Once your package is built, use "sudo pacman -U <package-name>" to install it.  Replace "<package-name>" with the name of the package.

Cower, as given, has a few useful options on the terminal: "cower -d <package-name>" to download a package, and "cower -u" to display any updates if they are available.  Cower is what I use and of all the things you could use I think it is the best.

Offline

#4 2012-10-18 02:46:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Can't execute makepkg due to user permissions

@headkase
Why not just run 'makepkg -si' (assuming the only dependencies are from the repos)? What does directory ownership has to do with installing packages with pacman?

AUR helpers should be used only when the user knows what makepkg & Co. does.

Offline

#5 2012-10-18 02:48:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Can't execute makepkg due to user permissions

Also, cower comes form the AUR, thus the recommendation to install it does the OP no good, as he is unable to even get past a permissions problem.

Offline

#6 2012-10-18 02:49:45

headkase
Member
Registered: 2011-12-06
Posts: 2,008

Re: Can't execute makepkg due to user permissions

karol, I had mistakenly read "ran makepkg with sudo/as root and now all my files are owned by root."

WonderWoofy, use a different folder. tongue wink

Last edited by headkase (2012-10-18 02:51:50)

Offline

#7 2012-10-18 14:29:17

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Can't execute makepkg due to user permissions

johnnymike wrote:

I have been using ArchBang for about a year now and I decided this last weekend to install a true Arch Linux system.  Anyways, I have the base system installed and the basic configuration of the system completed and now I am trying to install yaourt so that I can use it to access the AUR.  I am following the instructions on the AUR wiki for the installation of the yaourt package (i.e. download the tar.gz, extract it, etc.).  The problem that I am having is that I cannot run the

makepkg -s

from my ~/build directory because I am getting a permission error when I try to run it under the user name (johnmichael) I created during the install.  I checked to make sure and the /builds directory is under my user's directory and it is.  Also, I tried running the makepkg command using sudo (I know that this is not a good idea) and it wouldn't let me because of the warning as running it as root.  So now I am in a situation where I can't run the makepkg command at all due to permission issues.

Because of this I did some reading on the Arch wiki and found the

ls -l /home/johnmichael

command to check the ownership of ~/johnmichael and sure enough the output reads

drwxr-xr-r      43295  root root 1355776  Oct 17  18:34  aur-mirror
drwxr-xr-r          4  root root    4096  Oct 18  17:34  builds

indicating that root owns my user home directory?  Is this correct, and if so, why is this the case?  Did I do something wrong when I created my user during the install?  More, importantly how do I fix this so that I can run the makepkg command within my ~/builds directory under my user account?  I read over the wiki for the chmod command but I am still not entirely clear how to fix this.

  • Don't wget/extract as root (this is probably what you did to break it)

  • as root:

    chown -R <youruser>:users  /home/<youruser>/thefoldersownedbyroot

Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB