Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
i was wondering how you can set the permissions to 777 for everything under / - including folders, files, and even mounted harddisk, without going through each individual folder?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Location
    North Carolina
    Posts
    56

    How I Remove Permissions?


    i was wondering how you can set the permissions to 777 for everything under / - including folders, files, and even mounted harddisk, without going through each individual folder?

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Why would you want to do this??

    I guess if you wanted you could use
    Code:
    chmod -R 777 /*
    But it really doesn't sound like a good idea.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    I would suggest not doing that.

  4. #4
    Linux Newbie ihayhurst's Avatar
    Join Date
    Jun 2005
    Location
    UK
    Posts
    138
    Like smalloy said why?, even the last OS on your distro list isnt quite that wide open... Was it just a way to get someone to answer or a genuine desire to achieve a particular effect ?

    the -R option in the code posted is Recursive, it drills down through the dir's below the given starting point...
    A recurring sysadmin's nightmare is that oneday a clever string of quoting and xargs etc will make recursive function like that match the dir '..' and your rm will 'escape' and wipe out your system (and career) makes me sweat just to think about it



    shudders

    Cheers
    Ian
    Registerd Linux user #119296

  5. #5
    Linux User
    Join Date
    Nov 2003
    Location
    Brooklyn, NY
    Posts
    347
    The permissions are there for a reason, if you set everything to 777 every user on the box will be capable of destroying your whole system. This is a major security risk, I strongly suggest you do not do this.

  6. #6
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    The experts can correct me if I'm wrong, but one of the benefits of linux is that stuff d/loaded from the net (inc. viruses) are not executable. If you regularly run a script that makes everything executable, this will include any nasty wee pieces of code that you may inadvertantly have d/loaded.
    For someone moving from windows it may seem like a pain to have to use su just to use certain commands, or to access certain files, but when you realise all the benefits of doing it like this it gives you a warm cosy feeling to know how safe your computer is.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  7. #7
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Things in /proc /sys and /dev have their permissions changed systematically all the time, and there is no reason to change them anyway. If you really must do it, maybe consider something less severe like
    Code:
    chmod -R 666 /*
    It is asking for trouble though.

  8. #8
    Just Joined!
    Join Date
    Jul 2005
    Location
    Inside the Kernel (somewhere)
    Posts
    41
    Setting global permissions like this is bad, bad, bad, bad, bad.
    Not only is it insecure, but it will break quite a few things, such as perl scripts,
    php (if compiled with suexec mode on), and numerous other things.

    Permissions are setup by the distro @ default, and should be left as they are, unless they're too lenient, and then they should be changed on a case by case, file by file basis, never on a global basis.

  9. #9
    Just Joined!
    Join Date
    Jun 2005
    Location
    North Carolina
    Posts
    56
    thanks everybody

    i only have one user anyways, and it gets annyoing when i try to install something and it cant overwrite a file.

  10. #10
    Just Joined!
    Join Date
    Jul 2005
    Location
    Inside the Kernel (somewhere)
    Posts
    41
    You'll still have that kind of a problem, with installing rpm based stuff. This is why you use the sudo command effectively.

    I know it's annoying, but lousy permissions will cause lots of problems. Even if it's only a one user system, if it's setup with an internet connection, it can still be very hazardous to your health to do this

Page 1 of 2 1 2 LastLast

Posting Permissions

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