Posts

Showing posts with the label USB file system

How to change default permission for usb devices filesystem

 To change the default permissions for USB devices' filesystems in Linux, you can use a combination of udev rules and mounting options. Here's how to do it: 1. **Identify the USB Device**:    Plug in the USB device and note its properties, such as the vendor ID and product ID. You can use the `lsusb` command to list connected USB devices and get this information. 2. **Create a Custom udev Rule**:    You can create a custom udev rule to specify the permissions and ownership for the device when it's connected. For example, create a file in the `/etc/udev/rules.d/` directory, such as `/etc/udev/rules.d/99-usb-permissions.rules`, and add the following content:    ```bash    SUBSYSTEMS=="usb", ATTRS{idVendor}=="your_vendor_id", ATTRS{idProduct}=="your_product_id", MODE:="0666"    ```    Replace `"your_vendor_id"` and `"your_product_id"` with the actual values from the `lsusb` output for your USB device. The `MODE:="