# MTP permissions

## Dachnaz

I just got a Creative Zen Sleek Photo, and I want it to work with my Gentoo system. I have libmtp 0.0.20 and I can get to my mp3 player as root user, but not as a normal user. I try the following and get:

```
$ mtp-detect

Found non-autodetected device "Creative Zen Sleek Photo" on USB bus...

usb_claim_interface(): Operation not permitted

Connection error.

No devices.
```

As root this works just fine, but I want to be able to do these actions as a user in order to use amaroK's capability. The user is already part of the usb and plugdev groups; I cannot figure out what permissions I must give the user for mtp. Does anyone know? Thanks in advance.

----------

## Kurous

I had this exact problem and pulled my hair out trying to solve it, but this worked, follow this  http://amarok.kde.org/wiki/Media_Device:MTP and then I had to make two changes in order to get the udev permissions correct, first SYSFS is deprecated in my version of Udev (0.98 I think) and has been replaced by ATTRS, second, I also had to add a GROUP permission, so for example, the line for my player looked like this:

```
ATTRS{idVendor}=="0930", ATTRS{idProduct}=="000c", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
```

Hope that helps you

----------

## Internets

Gravedigging this thread to post my problem. libmtp _can_ detect my mp3 player (Creative Zen V) as root, but not as my normal user. See below:

As normal user:

```
$ mtp-detect

No MTP devices.

No devices.

```

As root:

```

# mtp-detect

Autodetected device "Creative Zen V" (VID=041e,PID=4150) is known.

PTP: Opening session

Connected to MTP device.

USB low-level info:

   Using kernel interface "usbfs"

   bcdUSB: 512

   bDeviceClass: 255

   bDeviceSubClass: 0

   bDeviceProtocol: 0

   idVendor: 041e

   idProduct: 4150

   IN endpoint maxpacket: 512 bytes

   OUT endpoint maxpacket: 512 bytes

   Device flags: 0x00000000

Device info:

   Manufacturer: Creative Technology Ltd

   Model: Creative Zen V

   Device version: 1.11.01_0.05.09

   Serial number: CEAA84930002FA9DCEAC93610002FA9D

   Vendor extension ID: 0x00000006

   Vendor extension description: microsoft.com: 1.0;microsoft.com/WMPPD: 10.0;microsoft.com/WMDRMPD: 10.1;audible.com: 1.0;

Supported operations:

   1001: get device info

   1002: Open session

   1003: Close session

   1004: Get storage IDs

   1005: Get storage info

   1007: Get object handles

   100c: Send object info

   100d: Send object

   100f: Format storage

   1014: Get device property description

   1015: Get device property value

   1006: Get number of objects

   1008: Get object info

   1009: Get object

   100b: Delete object

   1010: Reset device

   1016: Set device property value

   1017: Reset device property value

   9801: Get object properties supported

   9802: Get object property description

   9803: Get object property value

   9804: Set object property value

   9805: Get object property list

   9806: Set object property list

   9808: Send object property list

   9807: Get interdependent property description

   9810: Get object references

   9811: Set object references

   9201: Report Added/Deleted Items

   9101: Get secure time challenge

   9102: Get secure time response

   9103: Set license response

   9104: Get sync list

   9105: Send meter challenge query

   9106: Get meter challenge

   9107: Get meter response

   9108: Clean data store

   9109: Get license state

Events supported:

   None.

Device Properties Supported:

   0x5001: Battery Level

   0xd401: Synchronization Partner

   0xd402: Device Friendly Name

   0xd101: Secure Time

   0xd102: Device Certificate

   0xd201: Unknown property

Playable File (Object) Types and Object Properties Supported:

   3009: MP3

      de99: AudioWAVECodec

      de9a: AudioBitRate

      dc46: Artist

      dc89: Duration

      dc8b: Track

      dc8c: Genre

      dc99: OriginalReleaseDate

      dc9a: AlbumName

      de93: SampleRate

      de94: NumberOfChannels

      de95: AudioBitDepth

      dc91: UseCount

      d901: BuyFlag

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   b901: WMA

      de99: AudioWAVECodec

      de9a: AudioBitRate

      dc46: Artist

      dc89: Duration

      dc8b: Track

      dc8c: Genre

      dc99: OriginalReleaseDate

      dc9a: AlbumName

      de93: SampleRate

      de94: NumberOfChannels

      de95: AudioBitDepth

      dc91: UseCount

      d901: BuyFlag

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   3008: MS Wave

      dc46: Artist

      dc89: Duration

      dc8b: Track

      dc8c: Genre

      dc99: OriginalReleaseDate

      dc9a: AlbumName

      de93: SampleRate

      de94: NumberOfChannels

      de95: AudioBitDepth

      dc91: UseCount

      d901: BuyFlag

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   300c: ASF

      de99: AudioWAVECodec

      de9a: AudioBitRate

      dc46: Artist

      dc89: Duration

      dc8b: Track

      dc8c: Genre

      dc99: OriginalReleaseDate

      dc9a: AlbumName

      de93: SampleRate

      de94: NumberOfChannels

      de95: AudioBitDepth

      dc91: UseCount

      d901: BuyFlag

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   b904: Audible.com Codec

      da01: unknown(da01)

      da02: unknown(da02)

      da03: unknown(da03)

      dc46: Artist

      dc89: Duration

      dc8b: Track

      dc8c: Genre

      dc99: OriginalReleaseDate

      dc9a: AlbumName

      de93: SampleRate

      de94: NumberOfChannels

      de95: AudioBitDepth

      dc91: UseCount

      d901: BuyFlag

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   ba05: Abstract Audio Video Playlist

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   ba03: Abstract Audio Album

      dc86: RepresentativeSampleData

      dc81: RepresentativeSampleFormat

      dc83: RepresentativeSampleHeight

      dc82: RepresentativeSampleSize

      dc84: RepresentativeSampleWidth

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   3801: JPEG

      dc88: Height

      dc86: RepresentativeSampleData

      dc81: RepresentativeSampleFormat

      dc83: RepresentativeSampleHeight

      dc82: RepresentativeSampleSize

      dc84: RepresentativeSampleWidth

      dc87: Width

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   bb83: vCard3

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   be03: vCalendar2

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   3000: Undefined Type

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   3001: Association/Directory

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

   b802: Firmware

      dc01: StorageID

      dc0b: ParentObject

      dc02: ObjectFormat

      dc04: ObjectSize

      dc07: ObjectFileName

      dc41: PersistantUniqueObjectIdentifier

      dc4f: NonConsumable

      dc44: Name

Storage Devices:

   StorageID: 0x00010001

      StorageType: 0x0003

      FilesystemType: 0x0002

      AccessCapability: 0x0000

      MaxCapacity: 990543872

      FreeSpaceInBytes: 135626752

      FreeSpaceInObjects: 4294967295

      StorageDescription: Storage Media

      VolumeIdentifier: CEAA84930002FA9DCEAC93610002FA9D

Special directories:

   Default music folder: 0x00000051

   Default playlist folder: 0x00000055

   Default picture folder: 0x00000061

   Default video folder: 0x00000000

   Default organizer folder: 0x0000005d

   Default zencast folder: 0x00000000

   Default album folder: 0x00000000

   Default text folder: 0x00000000

MTP-specific device properties:

   Friendly name: My Zen

   Synchronization partner: (NULL)

   Battery level 178 of 255 (69%)

libmtp supported (playable) filetypes:

   ISO MPEG-1 Audio Layer 3

   Microsoft Windows Media Audio

   RIFF WAVE file

   Microsoft Advanced Systems Format

   Audible.com Audio Codec

   JPEG file

   VCard version 3

   VCalendar version 2

   Firmware file

Secure Time:

<DRMCLOCK type="status"><VALUE>#20050922 10:38:59Z#</VALUE><FLAG>DRM_CLK_NEEDS_REFRESH</FLAG></DRMCLOCK>

Device Certificate:

<DEVCERT version="1.0"><CERTIFICATE type="DEVICE"><DATA><UNIQUEID private="1">k4Sqzp36AgBhk6zOnfoCAAAAAAA=</UNIQUEID><PUBLICKEY private="1">VMjrZY5ROftY4VvHnNjIgl7szRZxsvaATfghTzsS6A4mdzJfAxTzEA==</PUBLICKEY><KEYDATA>YUD1HVnO7sLfOaTZqZjSk1R5L4U=</KEYDATA></DATA><MSDRM_SIGNATURE_VALUE>f31ARbyTtkHBMninwqqoXHJTNgU7UdFxZFMTnkXQv9dgjXKjfz1SRw==</MSDRM_SIGNATURE_VALUE><SYMSIGNATURE>KVNHzak/AtvALRGGA0Fjy+Epdck=</SYMSIGNATURE></CERTIFICATE><FALLBACK><SECURITYVERSION>2.4.104.139</SECURITYVERSION><CERTIFICATE private="1">VMjrZY5ROftY4VvHnNjIgl7szRZxsvaATfghTzsS6A4mdzJfAxTzEAIEaIvbvcVI9wYohU/YorucVGErGk9AfsNvg0iJ+q7R8m8rbL/EmozifpFw</CERTIFICATE></FALLBACK><CERTIFICATE type="GROUP"><DATA><NAME>Creative Zen V</NAME>

  <MANUFACTURER>CL Direct Pte Ltd.</MANUFACTURER>

  <MODEL>DAP-FL0036</MODEL>

  <SECURITYLEVEL>2000</SECURITYLEVEL>

  <HARDWARE_VER_MAJOR>1</HARDWARE_VER_MAJOR>

  <HARDWARE_VER_MINOR>0</HARDWARE_VER_MINOR>

  <FIRMWARE_VER_MAJOR>1</FIRMWARE_VER_MAJOR>

  <FIRMWARE_VER_MINOR>0</FIRMWARE_VER_MINOR>

  <FEATURES>

    <CLOCK>2</CLOCK>

    <SECURECLOCK>

      <URL>http://go.microsoft.com/fwlink/?LinkId=25817</URL>

      <PUBLICKEY>!CNhvvz1WaNV1AFUmetxkvm9iD4UrE9cnGUi!qcqdxMiXmD1*ikYGA==</PUBLICKEY>

    </SECURECLOCK>

    <METERING>1</METERING>

    <LICENSE_ACQ>0</LICENSE_ACQ>

    <LICENSE_SYNC>1</LICENSE_SYNC>

    <ENCRYPTION>0</ENCRYPTION>

    <SYMMETRIC_OPT>1</SYMMETRIC_OPT>

  </FEATURES>

  <LIMITS>

    <MAXCHAINDEPTH>2</MAXCHAINDEPTH>

    <MAXLICENSESIZE>10240</MAXLICENSESIZE>

    <MAXHEADERSIZE>5120</MAXHEADERSIZE>

  </LIMITS><PUBLICKEY>AwE2OSTIgFuzHvE8vC1w6E9MG1PCQ3HzTPJGtSMl8NvC2U7OikanZw==</PUBLICKEY></DATA><MSDRM_SIGNATURE_VALUE>ANlrFR1DlR4vZwcsaLD6roTpv3nImj/OnFG3yOSWUwsCVD4kb+uhfQ==</MSDRM_SIGNATURE_VALUE></CERTIFICATE><CERTIFICATE type="AUTHORIZATION"><DATA><SECURITYLEVEL>2000</SECURITYLEVEL><AUTH_ID>1007</AUTH_ID><PUBLICKEY>fP5fVUkHCjq7OoLGkVhca1u5ehuKNerfFzwY8+38k6idDPn3KNhYGA==</PUBLICKEY></DATA><MSDRM_SIGNATURE_VALUE>uvG3IvEcpr+y86jyvARIl/3r8US21GTPDEh176DnbwZ5aiTLgiWyPg==</MSDRM_SIGNATURE_VALUE></CERTIFICATE><CERTIFICATE type="AUTHORIZATION_ROOT"><DATA><AUTH_ID>1</AUTH_ID><PUBLICKEY>a1t3hxrg!qbOgktnbYaEEi4teCse!gz6RvTPuC!zizKJlpU7xoduSw==</PUBLICKEY></DATA><MSDRM_SIGNATURE_VALUE>TNP/C0hseezVflFmD5hyoSk8AUYsz6sn6q0hyDFaB6Fj6DEjaG2QQQ==</MSDRM_SIGNATURE_VALUE></CERTIFICATE></DEVCERT>ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿ï¿¿

PTP: Closing session

OK.

```

----------

## chh

Hi,

had the sane problem.

Adding the user to the groups haldaemon and plugdev solved it.

Christian

----------

## notanatheist

Follow the above link and when you are done type 'udevstart' and you should be able to use mtp-detect as a normal user. Be sure Amarok is compiled with mtp support as well. I'm using Porthole which makes it easier to add the needed use flags on a per package basis. 

Now I'm left with not being able to write to the device though I can force its detection in Amarok.

----------

