Archived

This topic is now archived and is closed to further replies.

Mattman

Running Linux apps -- 'root' user vs. other users

Recommended Posts

I''m just starting to program in Linux, and I made a small program. I used a custom Makefile to compile the app. However, once the app is compiled, only the root user can run the app. How do I go about allowing any user to run my app? Does it require a specific flag when compiling? Thanks!

Share this post


Link to post
Share on other sites
type this at the command line to find out

man chmod

you''ll get something like

chmod ugo+x filename

to make it executable, or you could do

chmod 111 filename

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You should never compile things as root. You should only "su" to do things that really require root, such as running tcpdump or chmod-ing /dev nodes, and installing already-compiled binaries.

Use a regular user account to edit, compile, and test your software. Once it comes time to install, su to root and compile the file to the right place, and chmod it to the right mode. The "install" command will copy + chmod in one operation, if you prefer.

Share this post


Link to post
Share on other sites
Wow, I think I''ve gone retarded for the day. I definately knew the answer to that question, but I guess my brain is dead from already working with computers as a job for 8 hours straight. Anywho, thanks for the replies, and hopefully this thread will be seen again by those who need the info

Share this post


Link to post
Share on other sites