LinuxQuestions.org
Help answer threads with 0 replies.
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 12-30-2012, 10:28 AM   #1
betthupferl
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Rep: Reputation: Disabled
Program only works as root - but i fail to change permissions


Hello dear Linux Users,

I use Ubuntu 12.04 and I recently installed texlive through the TeX Live Backports PPA. Texlive consists of various sub-programs, but after installation they didn't work but I figured out when running them as root, they do. I'm trying to change permissions so that I can run them from my normal user account. But I failed. Could anybody help me?

Here one example for one sub-program called pdflatex:

When run without sudo:
$ pdflatex test.tex
lstat(./pdflatex) failed ...
./pdflatex: No such file or directory
pdflatex: ../../../texk/kpathsea/progname.c:316: remove_dots: Assertion `ret' failed.
Aborted (core dumped)

With sudo:
$ sudo pdflatex test.tex
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
restricted \write18 enabled.
(...) program runs fine

But I have permissions to run pdflatex!!
$ ls -l /usr/bin/pdflatex
lrwxrwxrwx 1 root root 6 Jul 3 10:35 /usr/bin/pdflatex -> pdftex

What is wrong?

Last edited by betthupferl; 12-31-2012 at 12:35 PM.
 
Old 12-30-2012, 11:02 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Perhaps try

Code:
which pdflatex
and

Code:
sudo which pdflatex
 
Old 12-30-2012, 11:44 AM   #3
betthupferl
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Both are the same:

$ which pdflatex
/usr/bin/pdflatex

$ sudo which pdflatex
/usr/bin/pdflatex
 
Old 12-30-2012, 12:53 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,446

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
Have you tried running it with the full path as a user:

Code:
/usr/bin/pdflatex
Have you checked to see if the the permissions on pdftex are the same? I'm not familiar with these programs so, just guessing?
 
Old 12-30-2012, 12:59 PM   #5
betthupferl
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ohhh!! Yes, /usr/bin/pdflatex test.tex is working!!!

So what do I need to do, that I don't have to type the path?
 
Old 12-31-2012, 11:42 AM   #6
rmolinger
LQ Newbie
 
Registered: Dec 2012
Location: Minnesota
Distribution: Suses, Fedora, Centos, Adnroid
Posts: 7

Rep: Reputation: Disabled
I noticed that /usr/bin/pdflatex is a symbolic link to /usr/bin/pdftex
I can only assume that /usr/bin is in your path, have you tried using the command pdftex instead of pdflatex? Just an idea.

Otherwise, in answer to your question about not having to type the path, you could try an alias (assuming you are using the bash shell)

Code:
alias pdflatex=/usr/bin/pdflatex
This is kind of a hack, and some day in the future you will wonder why you created that alias, but it might work.

Good luck!
 
Old 12-31-2012, 12:35 PM   #7
betthupferl
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Yes, it did. Thank you very much for your help!
 
Old 01-04-2013, 06:00 PM   #8
mekanixx
LQ Newbie
 
Registered: Apr 2009
Location: Alabama
Distribution: Puppy, Linux Mint, Ubuntu
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by betthupferl View Post
But I have permissions to run pdflatex!!
$ ls -l /usr/bin/pdflatex
lrwxrwxrwx 1 root root 6 Jul 3 10:35 /usr/bin/pdflatex -> pdftex

What is wrong?
I know this is marked as "solved" but ... I'm new at this permissions thing but it look like (unless your user name is "root") that you don't own this file. "root" does.

lrwxrwxrwx 1 root root 6 Jul 3 10:35 /usr/bin/pdflatex -> pdftex

Someone with more linux knowledge can confirm if this is correct.

Doyle
 
Old 01-05-2013, 02:38 AM   #9
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
That's true, mekanixx, but the world (or "other") permissions are set to rwx (the last three letters are the world permissions) so ey should have been able to run it anyway. Read http://www.tuxfiles.org/linuxhelp/filepermissions.html for more info
 
1 members found this post helpful.
  


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
Cannot change permissions as root TheGabeMan Linux - Security 4 10-29-2012 01:40 PM
[SOLVED] How can I change file permissions in windows ntfs partition.Even root can't change it e3399 Linux - Newbie 3 03-02-2011 10:54 PM
SLIM: fail to start session (windowmaker, e17, etc..) as user - root works. lostinpurdy Arch 5 02-26-2010 10:19 PM
[SOLVED] Compositing only works for root, permissions problem? vdemuth Slackware 1 01-07-2010 05:00 AM
Scanner works only as root - permissions issue jlinkels Linux - Hardware 3 11-29-2008 04:17 PM

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

All times are GMT -5. The time now is 08:27 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