PDA

View Full Version : Linux is about to come off



Shadda
01-15-2005, 02:06 AM
Okay, let me say that i like linux. I like working in it.

But its gone too far.

I can't work. I can't do anything.

To Work on my files, like say, PHP scripts, under /var/www i have to be root. To IRC, or do anything else, i'd be a fool to do that as root.

So what the hell? Am i supposed to logout/log back in for each individual task? The bastards in #debian seem to thing chmodding my entire fucking system is a good idea.

Are they on crack, or what? You shouldn't have to change the goddamn files, you should just be able to change the USER. Give it better permissions, and what not. Why the hell is that so hard?

UnderScore
01-15-2005, 02:23 AM
To Work on my files, like say, PHP scripts, under /var/www i have to be root. That should not be true. On Debian, apache is run as user www-data & not a root user. See the 4th line in the httpd.conf file here http://www.splitbrain.org/The_dot-Files/xerxes/show.php?conf=__etc__apache__httpd.conf.cnf. That is the username that owns /var/www/ and you should not need to edit files as root. See this Google search for more info (http://www.google.com/search?hl=en&lr=&c2coff=1&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial_s&q=su+root+change+id&btnG=Search) on that.


So what the hell? Am i supposed to logout/log back in for each individual task?Are you aware of a utility called su and sudo? Take the following example: I am in KDE and surfing the web with firefox. I read a webpage that talks of enabling DMA with hdparm. Since hdparm requires root access to enable/disable. Do I then logout as me and then login as root? No, I either su - and become root or I run sudo hdparm -c 1 -d 1 /dev/hda. Thus I have changed my identity temporarily.

You shouldn't have to change the goddamn files, you should just be able to change the USER. Give it better permissions, and what not. Why the hell is that so hard? Exactly. Windows has a "Run as" function for its executables. Linux/Unix has su or sudo & kde has a program called kdesu (http://docs.kde.org/en/3.3/kdebase/kdesu/)

Shadda
01-15-2005, 02:47 AM
I know all about su and sudo. My point is, if i'm not running something straight from konsole, i shouldn't have to manually add 'sudo' to every program i want to use. It's ridiculous.

Shadda
01-15-2005, 03:15 AM
My problem here is, I can't work like that. I can't even start apache without logging in as root, or shut down the computer, or anything. if there were some way to give my user super user permissions, while not actually being root (just, full admin power) that'd solve everything.

pureone
01-15-2005, 03:26 AM
really the whole chmod thing is for security. i do not mind have the file permission set up as it is. it may be a bit harder but its worth it.

what i find is much easyer then doing everything in the console as root and with out having to log on to kde as root. i click the k start button go to system and go to the file manage as superuser mode, i find i can do anything i want like this and i dont have to log in and out of the kde.

enjoy :D

markpreston
01-15-2005, 11:34 AM
Stick all your web files under the /var/www directory.
Then do su
Then
chmod -R 777 /var/www
Then you should be able to edit and test your files as any user. Just be sure to adjust the permissions before putting them out on the web.
To start apache. Continue logged in as root.
ksysv
Clicking the Apache icon should enable you to click a start button.
By dragging the Apache icon on the left column to start on runlevels 3, 4 and 5 you will ensure Apache starts at boot time.
Alternatively you can use logos in /etc/skel/Desktop to start processes using commands such as
sudo /usr/local/bin/startLAMP
This then executes a bash script such as
#!/bin/bash

# Start Apache, MySQL and PHP
/etc/init.d/apache start
/etc/init.d/mysql start
mozilla "http://127.0.0.1/index.php"

Regards,
Mark