Linux UGH!!!

Discussion in 'Random Ramblings' started by rebelcowboysnb, Feb 22, 2011.

  1. rebelcowboysnb

    rebelcowboysnb Confederate Money Farm

    Ok, I am the go to guy around here when it comes to anything "Windows" but I need to step things up on my webserver that likes to crash every now an then. I thought i would try Linux. I started with Ubuntu but the version of Apache it loaded was set up for multiple websites. I figured relearning 2 things at once was a bad idea so now Im playing with Fedora. I got Apache installed an it is working. Went to add my website files to the right folder an it wont let me because I'm not root. S I put them on the desktop an used the su - command to change the .conf file to use the file on the desktop... Go to restart Apache an it cant see my files cause it dont have permission...

    So I cant put the files where they go cause of not having permission an Apache cant read my files where they are because of permissions an they block signing in as root. Who come up with this junk. [​IMG]


    Anyone Linux gurus know how to make this work?
     
  2. key west chick

    key west chick Chillin' With My Peeps

    May 31, 2008
    Gainesville, GA
    DH loves Linux but he's still at work. He hates Windows with a passion. I'll ask him when he gets home later if you're still having issues.
     
  3. rebelcowboysnb

    rebelcowboysnb Confederate Money Farm

    I got 2 days in it so I probably will. [​IMG]
     
  4. key west chick

    key west chick Chillin' With My Peeps

    May 31, 2008
    Gainesville, GA
    Is there a reason you can't log on as root and do all of this? This would probably be the easiest way to do things. I do databases and don't know a lot about apache buy I would think you could edit the appropriate .conf file and give the user you are using the appropriate permissions. I would log in as root then put the file in its default location (/var/httpd I think?). I have always found if you put files in places other than the default locations you tend to run into problems later if you are not familiar with the application or os (I think this is where some of your permission issues are coming from). You could then make or give any permissions you want to the file, if necessary, with the chown/chmod command. Or use GUI and right click the file and click properties then set the appropriate permissions. Don't assume the permissions are one thing. They could be from the application/user, file, or directory permissions. Hopefully this helps some and does not confuse the issue.
     
  5. rebelcowboysnb

    rebelcowboysnb Confederate Money Farm

    Yea, completely lost.... I have no idea how to copy an past a file in to a folder owned by root. I also don't understand permissions or how to change them an what they should be changed too.


    I don't see why a file made to be changed by the user is blocked?


    Signing in as root is blocked in both versions of Linux. I can use command line "su -" to mess with text files owned by root but being a actual root user is blocked somehow by both versions.


    I'm trying to go threw the how to stuff online to learn how to unlock root. But its slow. Its all command line an even in windows I only really know the GUI interface.
     
  6. key west chick

    key west chick Chillin' With My Peeps

    May 31, 2008
    Gainesville, GA
    Lets start with root. When you installed fedora it would have asked for a root password. When you log in you should be able to put in "root" as the user and enter the password you specified.

    For a default install of fedora I'm surprised it doesn't let you log in as root. This can be used as additional security but I only use it by not allowing remote access log in by root.

    If the above does not work can you log in as a user and then su to root? (from a command line prompt type "su root") then it will ask for the password for root. Enter the password and if accepted and you don't get any errors you are now operating as root. Now you can do anything you want with files.

    The only way to put a file in a directory owned by root is to be logged in as root.

    A standard install of fedora should be run level 5 which is gui. This would be the easiest way to get started in Linux.

    My thought on how all your issues started is that you created and placed the file in the appropriate apache directory and it was owned by the user you placed the file under. Then when apace tries to read the file (web page) it is looking for root or apace to be the owner of the file. Like I said I don't know apache, just general UNIX and databases.
     
  7. Junkmanme

    Junkmanme Chillin' With My Peeps

    THIS is ALL very interesting !!!

    It's stuff I orta learn.

    I learnt "typing" about 100 years ago. (Keyboard is still the same.)

    Yep. I should learn this.

    WHAT in the WORLD are you folks "talkin' about" ???

    I still ain't figured out those little "crossword thingys"...
    much less a "Rubic's Cube".

    (I think Rubic was a Russian "Counter-Intelligence Spy".)

    WHAT did y'all say?

    Geez...I think this stuff really "makes sense" to them Young-Uns.

    Lost in the Past,
    -Junkmanme- [​IMG]
    P.S. Anybody know where I can FIND an Oil Filter for my Pierce-Arrow? [​IMG]
     
  8. key west chick

    key west chick Chillin' With My Peeps

    May 31, 2008
    Gainesville, GA
    You are right about not being able to log in as root. I just installed fedora on a machine and you have to edit /etc/pam.d/gdm to have root login. Sorry I was thinking Red Hat Enterprise Server and not fedora. Here is what you need to do to allow root login but you need to use vi (a text editing application) in order to edit the file.

    http://www.cyberciti.biz/faq/fedora-10-root-login/
    (nixCraft is a very good Linux info site)

    Step by step to edit the file so you can log in as root:

    Open a terminal window
    Type: su root [hit enter]
    [enter password]
    Type: cd /etc/pam.d [hit enter]
    Type: vi gdm [hit enter]

    use you arrow keys and move the curser to the start of the line (towards the top of the file) "auth required pam_succeed_if.so user != root quiet"

    put the # sign at the beginning of the line. This will comment out the line. Now you should have:
    #auth required pam_succeed_if.so user != root quiet

    Now hold down the shift key and hit the colon/semicolon key [:;]
    Let go of the shift key
    Type: wq [hit enter]

    Now you should be back at a prompt

    Reboot and you should be able to log in as root. If you log in as root you will get a message saying the world may end if you log on as root but go ahead, the world wont end. It didn't for me at least because we are all still here. Good luck and don't expect any more replies tonight I have to be at work by 7 tomorrow. Workstation issues.
     
  9. rebelcowboysnb

    rebelcowboysnb Confederate Money Farm

    If you type root an then the root password at the log on screen it will fail. I figured out the su - command but it didnt open up things in GUI only command line stuff. Im not good with that.

    Here is what I found an did.
    http://razibdeb.wordpress.com/2011/01/19/enable-root-login-in-fedora-14/
    It worked an now root works at the log on screen so maybe I have it licked. Some of the settings in the .conf file for apache are different but not bad. Its loading my pages now so now its just tweaking the small stuff.


    I understand blocking root from basic users so they cant break stuff an its probably not a big deal for the high end users that can do everything in command line but that's going to keep a lot of users turned off of Linux.


    I need to learn an build a Squid Reverse proxy system for my website an that requires Linux so I have to learn...
     
  10. rebelcowboysnb

    rebelcowboysnb Confederate Money Farm

    Quote:I think thats what I did to get it to work. Learning is a pain in the you know what.

    Thanks for the help though.
     

BackYard Chickens is proudly sponsored by