LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I NOT have a root acc and still make a RAMDISK in linux? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-not-have-a-root-acc-and-still-make-a-ramdisk-in-linux-667932/)

mechagojira 09-06-2008 05:36 AM

Can I NOT have a root acc and still make a RAMDISK in linux?
 
I have a user account on a CentOS system.
For my student project, I need a ramdisk with about 300MB capacity.
Can I somehow create a ram-disk although I'm NOT root?
Thanks!

unSpawn 09-06-2008 05:50 AM

If /dev/shm is accessable you can use that to write to. Otherwise no you can't, only if your unprivileged user has been granted root rights (CAP_SYS_ADMIN in this case).

Whyte 09-06-2008 08:10 AM

Laughable, idiotic, and overly-complicated suggestion:

Maybe you could try User-Mode Linux? (or qemu, or some other kind of virtualization)

mechagojira 09-06-2008 11:57 AM

Quote:

Originally Posted by unSpawn (Post 3271368)
If /dev/shm is accessable you can use that to write to. Otherwise no you can't, only if your unprivileged user has been granted root rights (CAP_SYS_ADMIN in this case).


Thank you very much for this answer.

I wrote a perl-program which does a lot of file-access, reading a line, parsing the line, several x-thausand times. total runtime was 5 hours.

I then copied everything to /dev/shm in the hope that this would speed things up. it didn't, runtime is exactly the same as from HD!

So I guess the parsing of the line takes much more time than I thought, or /dev/shm got swapped or whatever.

anyway, thanks.

chrism01 09-07-2008 11:28 PM

Sounds odd. Care to post your prog?


All times are GMT -5. The time now is 10:26 PM.