syncdaemon allows creation of folder using symlinks

Bug #552818 reported by Natalia Bidart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
Medium
Guillermo Gonzalez
ubuntuone-client (Ubuntu)
Fix Released
Medium
dobey

Bug Description

* I create a folder named:

the-real-music-folder/

* then, I created a symlink pointing to it:

lrwxrwxrwx 1 nessita nessita 22 2010-03-31 17:02 TheSuperMusicUDF -> the-real-music-folder/

* then, I used u1sdtool to make TheSuperMusicUDF an UDF:

nessita@dali:~$ u1sdtool --create-folder=/home/nessita/TheSuperMusicUDF

this call blocked and never returned until killed. SD log shown:

# IDLE state

2010-03-31 17:02:30,527 - ubuntuone.SyncDaemon.Main - NOTE - ---- MARK (state: <State: 'QUEUE_MANAGER' (queues IDLE connection 'With User With Network')>; queues: metadata: 0; content: 0; hash: 0, fsm-cache: hit=11581 miss=1262) ----

# create folder was called

2010-03-31 17:02:36,936 - ubuntuone.SyncDaemon.DBus - DEBUG - Folders.create: dbus.String(u'/home/nessita/TheSuperMusicUDF')
2010-03-31 17:02:36,936 - ubuntuone.SyncDaemon.VM - DEBUG - create udf: '/home/nessita/TheSuperMusicUDF'
2010-03-31 17:02:36,938 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - CreateUDF share:--- node:marker:/home/nessita/TheSuperMusicUDF CreateUDF() queueing in the %s META_QUEUE
2010-03-31 17:02:36,938 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_META_QUEUE_WAITING, args:(), kw:{}
2010-03-31 17:02:36,938 - ubuntuone.SyncDaemon.StateManager - DEBUG - received event 'SYS_META_QUEUE_WAITING'
2010-03-31 17:02:36,939 - ubuntuone.SyncDaemon.StateManager - DEBUG - sending event to QueueManager
2010-03-31 17:02:36,939 - ubuntuone.SyncDaemon.QueueManager - DEBUG - Changing state IDLE -> WORKING_ON_METADATA
2010-03-31 17:02:36,939 - ubuntuone.SyncDaemon.QueueManager - DEBUG - In WORKING_ON_METADATA: running META_QUEUE
2010-03-31 17:02:36,939 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - CreateUDF share:--- node:marker:/home/nessita/TheSuperMusicUDF CreateUDF() starting
2010-03-31 17:02:36,940 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - CreateUDF share:--- node:marker:/home/nessita/TheSuperMusicUDF CreateUDF() running
2010-03-31 17:02:36,942 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': QUEUE_MANAGER (error=False connected=True online=True) Queue: WORKING_ON_METADATA Connection: With User With Network}
2010-03-31 17:02:45,490 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - CreateUDF share:--- node:marker:/home/nessita/TheSuperMusicUDF CreateUDF() success

# the UDF was correctly created on the server!

2010-03-31 17:02:45,490 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: AQ_CREATE_UDF_OK, args:(), kw:{'marker': marker:/home/nessita/TheSuperMusicUDF, 'node_id': '124222f1-d5e8-41c3-9f5e-a675a6d47dd9', 'volume_id': '34e90876-d94b-43ef-8003-e5adcb5a9091'}
2010-03-31 17:02:45,491 - ubuntuone.SyncDaemon.VM - DEBUG - add_udf: <UDF id '34e90876-d94b-43ef-8003-e5adcb5a9091', real path '/home/nessita/TheSuperMusicUDF'>
2010-03-31 17:02:45,491 - ubuntuone.SyncDaemon.VM - DEBUG - udf not in metadata, adding it!
2010-03-31 17:02:45,515 - ubuntuone.SyncDaemon.fsm - DEBUG - create: path='/home/nessita/TheSuperMusicUDF' mdid='b997945f-ef44-476b-9fb8-d497f74d53e7' share_id='34e90876-d94b-43ef-8003-e5adcb5a9091' node_id=None is_dir=True
2010-03-31 17:02:45,528 - ubuntuone.SyncDaemon.fsm - DEBUG - set_node_id: path='/home/nessita/TheSuperMusicUDF' mdid='b997945f-ef44-476b-9fb8-d497f74d53e7' share_id='34e90876-d94b-43ef-8003-e5adcb5a9091' node_id='124222f1-d5e8-41c3-9f5e-a675a6d47dd9'

# BOOM!

2010-03-31 17:02:45,529 - ubuntuone.SyncDaemon.local_rescan - INFO - scan dir: '/home/nessita/TheSuperMusicUDF' mdid: b997945f-ef44-476b-9fb8-d497f74d53e7
2010-03-31 17:02:45,532 - ubuntuone.SyncDaemon.local_rescan - ERROR - The path is in disk but it's not a dir: '/home/nessita/TheSuperMusicUDF'
2010-03-31 17:02:45,532 - ubuntuone.SyncDaemon.EQ - ERROR - Error encountered while handling: AQ_CREATE_UDF_OK in <ubuntuone.syncdaemon.volume_manager.VolumeManager object at 0x327ac90>
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/event_queue.py", line 790, in _dispatch
    method(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/volume_manager.py", line 989, in handle_AQ_CREATE_UDF_OK
    self.add_udf(udf)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/volume_manager.py", line 781, in add_udf
    d = self._scan_udf(udf)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/volume_manager.py", line 959, in _scan_udf
    d = self.m.lr.scan_dir(mdobj.mdid, udf.path, udfmode=True)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/local_rescan.py", line 132, in scan_dir
    raise ValueError(m)
ValueError: The path is in disk but it's not a dir: '/home/nessita/TheSuperMusicUDF'

# nothing else happens

2010-03-31 17:02:45,564 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_META_QUEUE_DONE, args:(), kw:{}
2010-03-31 17:02:45,565 - ubuntuone.SyncDaemon.StateManager - DEBUG - received event 'SYS_META_QUEUE_DONE'
2010-03-31 17:02:45,565 - ubuntuone.SyncDaemon.StateManager - DEBUG - sending event to QueueManager
2010-03-31 17:02:45,565 - ubuntuone.SyncDaemon.QueueManager - DEBUG - Changing state WORKING_ON_METADATA -> IDLE
2010-03-31 17:02:45,565 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': QUEUE_MANAGER (error=False connected=True online=True) Queue: IDLE Connection: With User With Network}
2010-03-31 17:04:30,527 - ubuntuone.SyncDaemon.Main - NOTE - ---- MARK (state: <State: 'QUEUE_MANAGER' (queues IDLE connection 'With User With Network')>; queues: metadata: 0; content: 0; hash: 0, fsm-cache: hit=11582 miss=1263) ----

Related branches

Changed in ubuntuone-client:
status: New → Confirmed
assignee: nobody → Ubuntu One Foundations+ team (ubuntuone-foundations+)
importance: Undecided → Medium
summary: - u1sdtool allows creation of folder using symlinks
+ syncdaemon allows creation of folder using symlinks
tags: added: chicharra u1-lucid
Changed in ubuntuone-client:
assignee: Ubuntu One Foundations+ team (ubuntuone-foundations+) → Guillermo Gonzalez (verterok)
status: Confirmed → In Progress
Changed in ubuntuone-client (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Rodney Dawes (dobey)
Changed in ubuntuone-client:
status: In Progress → Fix Committed
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
Changed in ubuntuone-client (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.