Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: mounting encrypted partitions as user not root

  1. #1
    Join Date
    Mar 2011
    Location
    India
    Posts
    5

    Question mounting encrypted partitions as user not root

    I'm rather new to linux, can some body tell me whether there is a way to mount, encrypted partitions as a normal user and not as root so that i may copy files into it using the file manager itself??

    even in the case of normal partitions other than /home, i can't seem add any data in them.
    the mount points i used are seperate directories within the /home partition??

    also, is there a way to create partitions in such a way that it can be accessed, just as how windows partitions are accessed in linux??

  2. #2

    Default Re: mounting encrypted partitions as user not root

    Hi,

    there are two sides to this:

    first, the actual mounting of the partition.
    AFAIK, only root can mount partitions (a normal user has to use root powers via sudo or su).

    Then, once the partition is mounted, make it readable/writable also to normal users. You could achieve this with the mount command, or else once, the partition is mounted, use dolphin in superuser mode (Suse menu->applications->system-filemanagers) and set the "properties" of the mounted dir such that normal users can also read/write into the dir.

    HTH

    Lenwolf

  3. #3
    Join Date
    Mar 2011
    Location
    India
    Posts
    5

    Default Re: mounting encrypted partitions as user not root

    Thank you sooooo much :-)...

    also of i add files into the partition that i mounted as root then, the files themselves will become root's wouldn't they??, meaning that even if i pasted that file from that, partition anywhere else, then it i won't be able to open it as a normal user. that would mean changing the permission of the partition is the best solution, wouldn't it??. also after i've changed the permissions would i be able to mount it as normal user??

    sorry to be a bother again :-(, but does this apply to encrypted partitions?? is there a way to set the permissions during the installation itself??

  4. #4

    Default Re: mounting encrypted partitions as user not root

    Hi,

    No, if normal users have read/write access to that directory, the file permissions would not change during the copying from their hoem dir to that dir, their files would remain theirs.

    To me, canging the permission of the partition seems to be the thing to do if normal users have to read/write into it.

    As to mounting the partition, again, from the command line AKAIK this can only be done with root powers (unless you insert something into fstab and use the "users" switch, see "man mount")

    Why don't you give us the exemple mount command that you currently use?

    HTH

    Lenwolf

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,798

    Default Re: mounting encrypted partitions as user not root

    After mounting there is NO difference in the handling of ownership/security bits of a file within a file system compared to that in say the root / filesystem.

    That means that the one who creates a file will be owner of the file (valid within / as well as any other mounted file system).

    Somebody can only create a file inside a directory where one is allowed by the security bits (rwxrwxrwx) and ownership (user:group).

    There is NO difference if this (is to) happen(s) in / or in /home (if that happens to be a seperate file system) or /home/mysuser/mymusic (if that happens to be a seperate file system).

    Of course the owner:group of the mountpoint of the root file system (that is /) should me root:root.
    Of course the owner of the mountpoint of the home partition (/home) should be root:root.
    Of course the owner of the mountpoint of this music partition should be myuser:users, like every other file/directory within /home/myuser (as well as /home/myuser itself.
    Henk van Velden

  6. #6
    Join Date
    Mar 2011
    Location
    India
    Posts
    5

    Default Re: mounting encrypted partitions as user not root

    thank you so much.
    i was trying to get it right for the whole of yesterday. finally i got tired and went with the partitions that the installer sugggested. now i'm planning to redo the whole partitioning also formatting my laptop :-).
    as soon as i'm done i'll try it the way you suggested and will post the result.

    actually i used mount as such mentioning the name of the partition as mentioned in the fstab file. i went through some websites to get an idea of partitioning.
    i'll get the partitioning done and then i'll post the reply.
    thank you again.

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,798

    Default Re: mounting encrypted partitions as user not root

    Maybe you will find some things you did not know about here: SDB:Basics of partitions, filesystems, mount points - openSUSE.
    These are the basics (as the title says) and you should understand them.
    Henk van Velden

  8. #8
    Join Date
    Mar 2011
    Location
    India
    Posts
    5

    Default Re: mounting encrypted partitions as user not root

    I got it done...

    thank you so much. now i've gotten two extra partitions and i am able to read and write files into them :-)

    i created two partitioins and mounted using mount and then changed the attributes in such a way that my normal user could write files into them :-) :-).
    its just as you explained, i have to be root to mount. also the files that i put into belong to the owners and there is no problem with the ownership.

    thank you again :-)

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: mounting encrypted partitions as user not root

    On 2011-03-21 08:36, Rizenphoenix 2010 wrote:
    >
    > Thank you sooooo much :-)...
    >
    > also of i add files into the partition that i mounted as root then, the
    > files themselves will become root's wouldn't they??,


    No.

    > also
    > after i've changed the permissions would i be able to mount it as normal
    > user??


    No.

    > sorry to be a bother again :-(, but does this apply to encrypted
    > partitions??


    Yes

    > is there a way to set the permissions during the
    > installation itself??


    Not really.



    You need to read documentation on how linux manages permissions. Any linux
    or unix book will do.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: mounting encrypted partitions as user not root

    On 2011-03-21 14:36, Rizenphoenix 2010 wrote:
    > its just as you explained, i have to be root to mount.


    You can mount as user with the appropriate options in fstab - but not
    encrypted partitions.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

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