Results 1 to 4 of 4

Thread: How to change /tmp directory? (not in fstab)

  1. #1
    Join Date
    May 2007
    Beans
    264

    How to change /tmp directory? (not in fstab)

    I'm having problems with available disk space so I need to change the location of my /tmp directory.
    One of the reasons is that K3B seems to need 4GB of free space to verify the burn operation.


    If I had my /tmp in fstab it would be easy, but I don't, so I don't know how can I do it.
    I've tried booting as single user and making a link, but I got a "device is busy" error.


    Any ideas?
    Thanks

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to change /tmp directory? (not in fstab)

    change the location in what way ?

    did you make a new partition ?

    Or do you have a new directory ?

    If you are using a new directory, use mount --bind

    mount --bind /new /tmp

    add a line to fstab

    Code:
    /new  /tmp  none bind
    You need to set the proper permissions of /tmp

    Code:
    sudo chown root.root /tmp
    sudo chmod 1777 /tmp
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    Apr 2008
    Location
    Kansas City
    Beans
    509

    Re: How to change /tmp directory? (not in fstab)

    This fixed mine too!

    What I meant to do, was "chmod 770 folder_name -R" to a folder I created at /

    What I did (after messing with windows machines all night) was "chmod 770 folder_name *" oops!!! that changed the folder permissions to all the folders in the root of the OS... where's my undo button?

    I thought I had changed everything back, but didn't know about the 1777 trick for /tmp. Gnome wouldn't load up a GUI interface for any user without doing that. Thanks!

    I learned something today, unfortunately it was about how to set permissions on tmp and not about reading whats typed in / before hitting ENTER.

  4. #4
    Join Date
    Oct 2008
    Location
    MN (a state of MiNd)
    Beans
    17

    Exclamation Re: How to change /tmp directory? (not in fstab)

    i just did the above suggestion, & it nuked my ubuntu. i had to live cd gksu gedit my fstab back to before that line -

    it kind of seems to be working, but i'm wondering (in ubuntu 10.10) *what do i need to do to restore from doing the above commands* - did you mean /new instead of /tmp zazen?

    is there anything i need to undo? i undid the fstab line.


    please pardon any incorrect etc info AS i have aphasia - sorrys


    EDIT: for one my file manager won't open - kind of a big problem.
    Last edited by lakitu; August 12th, 2011 at 03:58 AM.

Tags for this Thread

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
  •