Results 1 to 6 of 6

Thread: Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

  1. #1
    Join Date
    May 2012
    Beans
    52

    Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

    I'm troubleshooting trying to fix a known typo in a driver. I've found 1/2 a dozen tutorials, nothing is working. I've got a bunch of beginner guides open for the terminal commands, bash, etc. I keep running in to permission errors. I've been trying root / sudo/ chown, yada yada. Every time I think I'm making progress I end up nowhere.

    So, I had an idea. But, I don't want to blow up my install if it's a bad one.

    Part of what I've been playing with is running the .sh w/ --noexec --keep to extract it in to ~/tmp$. Then I need to mod one letter in one file and it's supposed to work. I've tried everything I can think of and everything in the tutorials; none of it works. I keep running in to permission errors when I'm in sudo. And when I'm in root and open the file in gedit there's nothing in it.

    I didn't check the contents of~/tmp$ before I started this; so I have no idea what "belongs" there and what is stuff I've extracted messing with this.

    Is it like doze? Can I just blow everything out of temp and anything that is needed will write itself back? I'm thinking that maybe part of the problem is that when I try new methods of fixing it that either the files are not being over written with each new extraction attempt or there's some kind of corruption that is causing the permissions to become "stuck".

    And just for giggles (since I'm just about hard up enough to try it) what happens if I sudo chown <username>.<groupname> ~/tmp$ and change it to me.me? Will I blow up my install? I just need it long enough to get this stupid driver fixed and I can reset it to root.root.

    I'm thinking (maybe I'm wrong) that if I change the permissions of the parent directory that all of the child objects will inherit those permissions and I can finally get the access I need to fix this stupid thing!

  2. #2
    Join Date
    May 2012
    Beans
    3

    Re: Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

    log into root if possible.
    su root
    you'll be prompted for a password if its been set in the past.

    Otherwise you have to find out who has ownership
    ls -l (whatever directory it is)
    then chown

    If i was getting mad at the thing I would find the object and probably chmod 777 (file) to allow read, write, and execute capability.

    worst case scenario delete whats in tmp. Tmp is for temporary files anyway.
    Last edited by ItsPerryXD; May 24th, 2012 at 05:37 AM.

  3. #3
    Join Date
    Apr 2012
    Beans
    6,635

    Re: Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

    wait... I'm confused

    do you really mean ~/tmp$

    or ~/tmp

    or /tmp

    or /tmp$

    these are all different things - the first two are dirs in your home directory and nothing to do with the system (although you may have some problems deleting ~/tmp$ since $ is a shell metacharacter and would need to be escaped)

    ... although nothing in /tmp should be system critical either fwiw

  4. #4
    Join Date
    May 2010
    Location
    uk
    Beans
    9,374
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

    Hi

    Just reboot. If it's /tmp then its contents will be wiped anyway.

    Post a link to the tutorial you are trying to follow and let us help you install the driver.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  5. #5
    Join Date
    Feb 2008
    Location
    Pelican Bay Correctional
    Beans
    Hidden!

    Re: Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

    Quote Originally Posted by ItsPerryXD View Post
    ...If i was getting mad at the thing I would find the object and probably chmod 777 (file) to allow read, write, and execute capability.
    That doesn't fix a damn thing.
    Sucuri.net Website Hacked Report 1Q-2016
    Sudo: you're doing it wrong - PDF - YouTube

  6. #6
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    146
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Deleting all files and subfolders in ~/tmp$ ? Or changing ownership ?

    try this:
    Code:
    sudo chmod -R a+x+rw
    -R makes the command recursively set permissions on the items inside the folder too.
    a means for everyone.
    +x means executable.
    +rw means readable and writable.

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
  •