Find the answer to your Linux question:
Results 1 to 7 of 7
ok I have a grasp of a slight understanding of the switches and what they do. Unfortunatly this one I was wrong on, why would /* reverse and go back ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    4

    Help with a chown /* gone bad


    ok I have a grasp of a slight understanding of the switches and what they do.

    Unfortunatly this one I was wrong on, why would /* reverse and go back to root and forward any folder and change the owner.... I thought it would run forward recursive and do all files/folders from within the level I called it from.

    Server Platform - Red Hat Linux 3.3.3-7

    Scenerio:

    Login to Shell, go to a user account:
    home/httpd/vhosts/website.com/httpdocs/folderlevel/

    At Folder level I ran:
    chmod -R apache /*

    Results:

    Folders at Root level and most other (not root, mysql and a few other obscure folders were not changed) I can deal with the website user sites being changed, thats a simple fix.

    The main issue is I need to locate an Overall Linux Folder/File ownership breakdown, what the following need to be owned by:

    <root>
    {Folder Name} - comments

    Bin and contents inside - all files are apache
    Boot - 'Same as BIN'
    Dev - 'Same as BIN'
    - This is a verry large folder, may be a ruff one to deal with
    Etc - 'Same as BIN'
    Home - Asuming root for Home, Httpd and Vhosts but maybe PSACLN - Not worried about user accounts yet web access still works, phew
    initrd - No files but still says apache - (oops)
    Lib - 'Same as BIN'
    lost+found - 'Empty'
    Misc - 'Empty'
    Mnt - 'Empty'
    Opt - 'Same as BIN'

    --- And the biggie -
    Proc - This one has manny folders as apache, but thinking this is bad, as some are owned by accounts, The main folder is Apache, sub folders are numbers guessing processes. However some folders are named along with files, no extensions which look like they may be server identifiers of some sort. Such as kcore - VERY large file, most others show as 0 but have some data, like version info.

    The folders here 'PROC' that I have concern for are:
    acpi - Contents all Apahe
    bus - Contents all Apahe
    driver - Contents all Apahe
    fs - Contents all Apahe
    ide - Contents all Apahe
    irq - Contents all Apahe
    net - Contents all Apahe
    scsi - Contents all Apahe
    sys - Contents all Apahe
    sysipc - Contents all Apahe
    tty - Contents all Apahe
    'allfiles inside PROC folder too - apache'

    Seems like alot, but im sure most of these are the same ownerships....

    Any one with a good Idea where to locate or obtain an ownership of these files......

    Thanks IA for assistance......

  2. #2
    Just Joined!
    Join Date
    Mar 2005
    Posts
    12

    / opposed to ./

    Oops, that one looks like it could be a headache to fix. First the def as to why. You used chmod user / as apposed to chmod user ./ The / means goto root and start there, ./ means start at the current working directory. Now to the permissions, I checked my school server's permissions in /proc/ and it looks like all of the folders you have listed are owned by root:root. Good luck with your recovery.

  3. #3
    Just Joined!
    Join Date
    Feb 2006
    Posts
    4
    Cool, that-l help...

    I did a ls -las and I see the group names, mostly as root, some as DISK I tried to change ownership of the ones as group to be the user disk but said unknown user....

    Ill keep truckin... and reset the proc ones right away.

    Can I assume those owned by group is the USER name too?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2005
    Posts
    12

    probably

    Having the ones that are owned by a seperate group than the owner are sortof rare, though they do exist and there are many occurances in a standard system. one example is /dev/pts/(#). These are owned by the user that currently holds the pts number, and the group is tty, so that the tty can write to the output (sorry if I confused you a little, basically, they exist, but its usually safe to asume that the group is the user). Also, if you want, I'll create a tree of the root file system, and the following permissions and post it on my website so you can see the file permissions, my server is running Fedora Core 4.

  6. #5
    Just Joined!
    Join Date
    Feb 2006
    Posts
    4
    Yea a Shot of the structure would be most excellent....

    I can't beleive Red Hat doesnt provide this info in a PDF or something. Im sure m not the 1st one to error this way...

  7. #6
    Just Joined!
    Join Date
    Feb 2006
    Posts
    4
    The main issue is with the Plesk Control Panel.

    Receiving error:

    ERROR: Unable to connect to database: get_admin_password() failed: file_get_contents() failed: 0: /usr/local/psa/admin/auto_prepend/auth.php3:67 psaerror(string "Unable to connect to database: get_admin_password() failed: file_get_contents() failed: ")

    ---

    This folder wasnt changes so Im lost, as I have no idea what DB connection its trying, the php files are encrypted for plesk at this end. hmm

  8. #7
    Just Joined!
    Join Date
    Mar 2005
    Posts
    12

    mysql?

    MY guess would be that plesk uses mySQL, the permissions for mysql are in /var/lib/mysql and should be owned by mysql:mysql, I'd just do chown -R mysql:mysql /var/lib/mysql/ for mysql, and just to be safe, chown -R postgresostgres /var/lib/pgsql. That should fix the permissions for the databases. I'm still working on making a snapshot of the different folder permissions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •