Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 16 to 20 of 20
  1. #16
    Member Jemshi's Avatar
    Join Date
    Sep 2003
    Location
    India
    Posts
    217

    Default

    single dot (.) is your current directory and
    double dot (..) is the parent directory

    so giving .* includes .. also. Better method to include all the files and folders (starting with dot too) is

    chmod -R user.group directory

    from its parent directory. And if you want to spare the directory, revert it back with

    chmod olduser.oldgroup directory

    Or, standing inside the directory,

    find . -exec chmod user.grop {} \; will also give the same result

    HTH
    Jemshad O K
    Sys Admin
    Bobcares.com
    http://www.poornam.com
    Winners don't do different things. They do things differently

  2. #17
    Member
    Join Date
    Sep 2004
    Posts
    422

    Default

    This is actually a common mistake ... I restored a server just at christmas, Christmas day for a client that did this

    < EDIT referred back to ticket - this is what happened in my case with one client >
    # ls -la /tmp
    # rm -rf *

    Only he wasn't in /tmp - he was in /
    </ EDIT>
    Believing that it would delete all files in /tmp that were prefixed with .

    You should really use the full system path to files when using wildcard deletes and chmod's, it's good practice.
    Last edited by DigitalN; 01-30-2005 at 06:19 PM.

  3. #18
    Member
    Join Date
    Mar 2003
    Posts
    604

    Default

    Quote Originally Posted by Finley Ave
    Can someone tell me why .* caused it to go up to a higher directory? Does that .* signify root directory? If I try ls . I get a listing for current directory, but if I try ls .* I get a listing for root directory.
    I don't know if it was the .* by itself. I'm pretty sure it was the -R (recursive) that killed it. Becuase the .* by itself should only change the directory you are currently in. But the recursive does the directory you are in and then goes above it and does all directories above it and so on....

  4. #19
    Member dianaward's Avatar
    Join Date
    Dec 2002
    Location
    USA
    Posts
    102

    Default I thought recursive only went down

    directory-wise???
    Diana Ward
    http://aqualityhost.com
    Sanity calms, but madness is more interesting.
    <cite>-- John Russell </cite>
    That's why I'm a Web designer/host."
    <cite>-- Diana Ward</cite>

  5. #20
    Member
    Join Date
    Mar 2003
    Posts
    604

    Default

    Quote Originally Posted by dianaward
    directory-wise???

    I believe the .* will actually do the . and the .. - so it will do the current directory and parent directory and anything above it.

    Needless to say I have learned my lesson on this one and will be much more careful when it comes to these types of edits....I just got in a hurry and wasn't paying attention.

Similar Threads & Tags
Similar threads

  1. CHMOD 000 Hacked
    By gtshadow in forum Data Protection
    Replies: 7
    Last Post: 09-03-2009, 03:35 PM
  2. I Accidently Deleted a lot of DNS Zones from /var/named
    By Dr. Bogger in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-30-2008, 06:40 AM
  3. Urgent: Folders and Files Permission(chmod) Problem!
    By WebHour.net in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-04-2006, 07:05 AM
  4. *cc* - should I chmod it to 000?
    By hostito in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-21-2003, 08:27 PM
  5. Chmod 000 c compilers
    By iago in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 05-18-2003, 01:32 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube