-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ntfs-3g-mount: mount failed: Operation not permitted #2
Comments
Please read the Readme |
I am using ubuntu 23.10
And I see here it is impossible to mount device :
|
seems weird ... maybe new restrictions in new released. Found some similar issues here : https://unix.stackexchange.com/a/759022 Maybe one workaround is to use screen to launch |
Not working for me, I will try with systemd 😄 |
let me know ! |
You'll need to modify the script a little to match yours, but I've done the following: Usb updateDoc to update a file when a USB flash drive is plug.
#!/usr/bin/env bash
# Debugging test script called by udev
# File paths, to be customized as needed
logFile="/tmp/logFileUsbHook.txt"
dateFile="/tmp/.logDateUsbHook.date"
# Ensure only one instance is running at a time
instances=$(lsof -t "$0" | wc -l)
if (( $instances > 1 )); then exit 1; fi
# Prevent multiple executions inside a 3-second time frame
if [ ! -f $dateFile ]; then
echo "lastExecution=0" > $dateFile
fi
source $dateFile # reads the $lastExecution var from file
timeframe=$(( $(date +%s) - $lastExecution )) # seconds from last execution
if (( $timeframe <= 3 )); then exit 1; fi
echo "lastExecution=$(date +%s)" > $dateFile
# Debugging info
echo "USB Device '$1' plugged in..." >> $logFile
sleep 5
# Retrieve the mount point of the USB device based on the device name
device_name="$1"
usb_mount_point=$(grep "$device_name" /etc/mtab | awk '{print $2}')
# Check if the USB device is mounted
if [ -n "$usb_mount_point" ]; then
# Access the directory of the USB device
cd "$usb_mount_point"
echo "USB device directory: $usb_mount_point" >> $logFile
# Check for the presence of the update.zip file
if [ -e "update.zip" ]; then
echo "The update.zip file was found." >> $logFile
# Unzip the update.zip file into the temporary directory
unzip -d /tmp/ "update.zip" >> $logFile 2>&1
# Do other stuff with the content of update.zip...
echo "The update.zip file was unzipped into /tmp/." >> $logFile
else
echo "The update.zip file was not found." >> $logFile
fi
else
echo "No mount point found for the device $device_name." >> $logFile
fi
# Do other stuff...
exit 0 Dont't forget to add execution with :
Reload rules
Reload services
|
Hi I have this issue when the usb key launch the script :
ntfs-3g-mount: mount failed: Operation not permitted
User doesn't have privilege to mount. For more information
please see: http://tuxera.com/community/ntfs-3g-faq/#unprivileged
umount: /tmp/sdd: must be superuser to unmount.
Copy to sdd >> Done !
sudo: unknown user stf
sudo: error initializing audit plugin sudoers_audit
The text was updated successfully, but these errors were encountered: