Hi Jean-Pierre > What is the difference of behavior you observe ? > How do you start ntfs-3g ?
I'm using shell_exec() php function to start a script in which ntfs-3g is used. On my old server (Ubuntu 16.04) which came with ntfs-3g version 2015.3.14, running the script with sudo worked. (Image got mounted) On my new server (Ubuntu 18.04.2) which comes with ntfs-3g version 2017.3.23, running the script with sudo doesn't work anymore. Later on I installed (2017.3.23AR.4) In the script itself ntfs-3g is started like this: /bin/ntfs-3g -o ro /mnt/sdb1/$RestoredImage /mnt/ImageMountPoint/$2 > What is the emulate login parameter ? > And what was the outcome ? In the process I learned that it is not smart to give the web-server user root privileges on a script, so I set the setuid bit on the ntfs-3g binary. And then run the script like this from php: shell_exec("/bin/bash -l -c \"/dummy_path/anon_file.sh $Param1 $Param2 $Param3 $Param4 $Param5\""); The outcome doesn't differ, output indicating success but no mount present. Example (ntfs-3g[64603]: Mounted /mnt/sdb1/Restored7831991136.img (Read-Only, label "", NTFS 3.1)) > What log file is this ? (syslog ?) > Are you using the debug option (which prevents daemonizing) ? Without the debug option output gets written to syslog. With the debug option output goes to the apache error.log Kind regards, Raffael -----Ursprüngliche Nachricht----- Von: Jean-Pierre André <jean-pierre.an...@wanadoo.fr> Gesendet: Montag, 24. Juni 2019 11:31 An: ntfs-3g-de...@lists.sf.net Betreff: Re: [ntfs-3g-devel] non interactive shell + ntfs-3g Nussbaumer Raffael (ID S4D) wrote: > Hi > > I’m writing to this mailing list because I don’t know where to ask > otherwise. > > I was wondering if since version 2015.3.14 there was a change that > forces the shell to be interactive in which the ntfs-3g binary gets > executed. There is no change relative to interactivity which I am aware of. However distributions may have made changes. What is the difference of behavior you observe ? > > The behavior I’m experiencing is that I get success messages in the > log file and the ntfs-3g process goes to sleep but no mount takes places. How do you start ntfs-3g ? What log file is this ? (syslog ?) > > When running the binary with the same parameters in an interactive > shell it works. (only non-default option set is read only) Are you using the debug option (which prevents daemonizing) ? > > What I tried so far is: > > Invoking the bash shell with the emulate login parameter, setting > setuid bit and compiling the master branch. What is the emulate login parameter ? And what was the outcome ? Jean-Pierre _______________________________________________ ntfs-3g-devel mailing list ntfs-3g-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel _______________________________________________ ntfs-3g-devel mailing list ntfs-3g-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel