Results 1 to 7 of 7

Thread: Chown file in external HDD

  1. #1
    Join Date
    Dec 2011
    Location
    Manchester, UK
    Beans
    356
    Distro
    Ubuntu

    Chown file in external HDD

    Hi, I'm backing up a file created with tiger john chkrootkit, to my external HDD for safekeeping. That way, if the system is compromised and the file is edited or removed, I will still have the file backed up so I can check it with the new report (this is all just hypothetical of course). Trouble is, I can't get the file to change permissions! When I try;
    Code:
    sudo -i
    Code:
    (root@computername:~#)cd /media/My Book/Security
    Code:
    bash: cd: 'My': no such file or directory found
    (My Book is the name of the HDD, and Security is the name of the directory it's {the file} is stored under).
    or:
    Code:
    cd /media/My-Book/Security
    doesn't work either. But when I do:
    Code:
    cd /media
    (root@computername:/media#)
    it works. Using the command;
    Code:
    ls
    I get:
    Code:
    My Book
    But I can't go to it! Does anyone know how to do this? Or any alternative (graphical) method? I can just back it up to cryptkeeper folder, but still.
    Last edited by 0011235813; May 1st, 2012 at 07:17 PM.
    Read my technology blog at: http://penguincampaigner.wordpress.com

  2. #2
    Join Date
    Dec 2011
    Location
    Manchester, UK
    Beans
    356
    Distro
    Ubuntu

    Re: Chown file in external HDD

    No matter, I've just compressed it with a simple password to foil any programs or hackers that get in.
    Read my technology blog at: http://penguincampaigner.wordpress.com

  3. #3
    Join Date
    Feb 2010
    Location
    U.K.
    Beans
    782
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Chown file in external HDD

    For future reference, using the command line you need to escape the spaces in any path or filenames with a backslash \

    e.g.
    Code:
    crypto@ubulaptop1204:~$ cd My\ Book/
    crypto@ubulaptop1204:~/My Book$
    Alternatively use the bash tab to auto-complete.

    e.g.
    Type
    Code:
    cd My
    Then press the >Tab< key and the path will be auto-completed with the escaped space already in there.

  4. #4
    Join Date
    Dec 2011
    Location
    Manchester, UK
    Beans
    356
    Distro
    Ubuntu

    Re: Chown file in external HDD

    Quote Originally Posted by cryptotheslow View Post
    For future reference, using the command line you need to escape the spaces in any path or filenames with a backslash \

    e.g.
    Code:
    crypto@ubulaptop1204:~$ cd My\ Book/
    crypto@ubulaptop1204:~/My Book$
    Alternatively use the bash tab to auto-complete.

    e.g.
    Type
    Code:
    cd My
    Then press the >Tab< key and the path will be auto-completed with the escaped space already in there.
    Thanks for that!
    Code:
    cd /media/My\ Book/
    worked.
    Read my technology blog at: http://penguincampaigner.wordpress.com

  5. #5
    Join Date
    Sep 2009
    Beans
    67
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Chown file in external HDD

    I am no expert in this area, but I know from experience that depending on the external device and how it may be formated, it sometimes will simply not allow you to change file permissions even as root. I remember running into this problem with a proprietary external drive that i have myself.


  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Chown file in external HDD

    Quote Originally Posted by Damascushead View Post
    I am no expert in this area, but I know from experience that depending on the external device and how it may be formated, it sometimes will simply not allow you to change file permissions even as root. I remember running into this problem with a proprietary external drive that i have myself.

    If the device is running NTFS or FAT, it won't let you chown or chmod, the owners/group and permissions are set at mount.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Jul 2011
    Location
    Montreal, QC
    Beans
    99
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Chown file in external HDD

    Hey,

    When using paths with spaces or capitals, etc, use single quotes around the path.

    Ex:

    Code:
    cd '/media/HDD/My Backup/file.txt'
    Also CaSe sensitive.

    If your HD is running NTFS, no file permissions are supported.

Bookmarks

Posting Permissions

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