Find the answer to your Linux question:
Results 1 to 3 of 3
I really need to know how to mount my fs(ext2) with the MS_MANDLOCK flag set. i have already changed the user group bit as well as the execution bit for ...
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    2

    Mounting with mandatory locking

    I really need to know how to mount my fs(ext2) with the MS_MANDLOCK flag set.
    i have already changed the user group bit as well as the execution bit for the file in consideration and have mounted the system by using the rw,mand option.
    but whn i tried the IS_MANDLOCK fuction on the inode of this file in my system call it returned zero(failed)......
    can anyone tell me some solution that would allow me to use mandatory locking on my fs?

  2. #2
    Just Joined!
    Join Date
    Feb 2008
    Posts
    29
    fcntl(2)

    Here is what I see on the man,

    "To make use of mandatory locks, mandatory locking must be enabled both
    on the file system that contains the file to be locked, and on the file
    itself. Mandatory locking is enabled on a file system using the "-o
    mand" option to mount(, or the MS_MANDLOCK flag for mount(2).
    Mandatory locking is enabled on a file by disabling group execute permission
    on the file and enabling the set-group-ID permission bit (see chmod(1)
    and chmod(2))."

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    2
    like i said ive set the user-group-id bit and disabled group execution bit.... i have also mounted the system with mand option....
    i chkd whether the inode of that file had mandatory locking via the IS_MANDLOCK function..... it returned a negative result... is there a better way to check whether mandatory locking for that file is enabled...??

Posting Permissions

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