Announcement

Collapse
No announcement yet.

What permissions are needed for "touch" (set/copy last modified date/time)?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • What permissions are needed for "touch" (set/copy last modified date/time)?

    Hi,

    I am struggling to find the right permissions to allow bc to set file date/time on NTFS partitions; in my current setup I have to run bc under root privilege to make this happen, else I would always receive an "operation not allowed" error message. By the way, bc behaves precisely the same as if running the touch command from CLI. So it is actually not a bc bug or problem, but rather which options are being used when mounting the NTFS partition (umask, suid, gid, uid) and which permissions (group memberships) have been assigned to the linux user.

    I would appreciate that you indicate a sample FSTAB entry for NTFS together with the applicable group memberships that would allow a non-root linux user to perform the touch operation on files located on NTFS partitions.

    Thank you for your help

    THN
    Last edited by THN; 01-Dec-2016, 08:13 AM.

  • #2
    Testing with an Ubuntu VM, I was able to connect an NTFS usb device and touch -m file without any extra effort or configuration. BC4 then also works if the permissions are correct.

    I loaded up the /etc/fstab file, but do not see an entry for this external drive. Looking at a folder's Properties:
    Owner: Me
    Access: Create and delete files
    Group: (my group)
    Access: Create and delete files
    Others: (blank)
    Access: Create and delete files
    Aaron P Scooter Software

    Comment


    • #3
      Hi Aaron

      thanks a lot for the quick response, I appreciate.

      Unfortunately, your example doesn't fit in two ways: a USB drive mounts dynamically when plugged in (whereas I have a fixed HDD mounted through /etc/fstab) and a VirtualBox guest utilizes the vbox file system (vboxsf) which is a mapper and shields the guest from accessing NTFS natively.

      Do you have a chance to run Linux natively and have it access a NTFS-formatted disk?

      My best,

      THN
      Last edited by THN; 01-Dec-2016, 02:19 PM.

      Comment


      • #4
        Hello,

        Most of our testing is Virtual Machine based for the large variety of Linux distros we need to install. I've used an alternate mount strategy, adding an NTFS drive as a HDD, which then did populate /etc/fstab with:
        /dev/disk/by-uuid/3552911A411BEDFD /mnt/3552911A411BEDFD auto nosuid,nodev,nofail,x-gvfs-show 0 0

        This method also allows NTFS timestamp editing on the CLI or BC4. Given the extreme variance in Linux distros, device drivers, and user configurations, and that you are unable to use "touch" on the command line, this seems to be a general issue with your set up. If you post your Distro/Version, it's possible that we or another user might be able to generally help, but this does not seem to be a Beyond Compare issue.
        Aaron P Scooter Software

        Comment


        • #5
          Thank you Aaron

          Indeed, one of the 4 parameters
          nosuid,nodev,nofail,x-gvfs-show
          is doing the trick. Now I don't know which one and why.

          My earlier FSTAB entry was
          defaults,umask=007,gid=users,locale=de_DE.UTF-8
          Now what remains is to understand which parameter is doing what, but that indeed is more a LINUX question than BC4

          My best

          THN

          Comment


          • #6
            I tested this again, and it turns out that I simply had to remove the umask and gid parameters from my FSTAB entry; after that it was working w/o problems.
            Cheers,
            THN

            Comment


            • #7
              Great! Glad that was able to help, as my Linux system knowledge is limited and I couldn't help with all of the different FSTAB variables.
              Aaron P Scooter Software

              Comment

              Working...
              X