LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-14-2010, 05:29 AM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Creating a tmpfs without root privileges


I've grown rather fond lately of creating tmpfs here and there to speed up various activities. (I think it is awesome that RAM can be mounted to a directory!)

The downside though, is that this requires root privileges. I don't really like this because then I either have to go root each time I want a tmpfs, or I have to add a new line to fstab each time I want a tmpfs in some new, odd place. (This becomes doubly weird when the odd place is somewhere like inside my personal home directory.)

Is there some other utility out there that can mount RAM as a filesystem, but allow mounting to be done without root privileges? It seems like this shouldn't be an issue, since a normal user has the ability to create and manipulate directories as well as borrow as much RAM as he wants.
 
Old 03-14-2010, 10:43 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Isn't that what sudo was invented for ?.
 
Old 03-14-2010, 11:26 PM   #3
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375

Original Poster
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by syg00 View Post
Isn't that what sudo was invented for ?.
Sigh... once again, my zero-reply status stolen away by someone who doesn't have the answer.

Yes, I already use password-less sudo. The problem isn't typing an extra four letter word. The problem is I feel I shouldn't have to invoke root privileges to mount a tmpfs (or some equivalent) at /scratch/username/specialproject/buildcache/ (or whatever) every time it occurs to me to do so. And it seems even stranger to have to put each of these directories in fstab for them to be automatically mounted, as fstab is really meant for global purposes (not the whims of a single user).

Anyway, I was just curious if there was some kind of user-space solution. I remember in the past using the fuse module with the fusermount tool to mount certain file systems without needing root privileges each time. I was wondering if there was something similar for a RAM-based file system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give only certain root privileges linuxfia Ubuntu 3 06-01-2009 11:35 AM
Creating tmpfs larger than physical ram arizonagroovejet Linux - General 6 10-05-2008 04:45 PM
Creating user account with no root privileges grob115 Linux - General 7 02-13-2007 04:43 AM
How to mount without root privileges? ni0wn Slackware 3 09-15-2004 05:03 PM
Option of tmpfs Instead of RAMdisk when Creating Bootdisk fbagnato Linux - Newbie 2 03-27-2002 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration