Closed qzhang234 closed 2 years ago
Who owns (in terms of Linux file system, user & group) the directory? What permissions does the directory have? The bluesky session must be able to write a file in that directory. You can try on a command line to create a file there without bluesky just to verify.
On Sat, May 21, 2022, 1:38 PM Qingteng Zhang @.***> wrote:
Assigned #285 https://github.com/aps-8id-dys/ipython-8idiuser/issues/285 to @prjemian https://github.com/prjemian.
— Reply to this email directly, view it on GitHub https://github.com/aps-8id-dys/ipython-8idiuser/issues/285#event-6655260869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMAWVIZZAZO5G3HIIH3VLEUSFANCNFSM5WSFYKWQ . You are receiving this because you were assigned.Message ID: @.***>
@prjemian You are right, I tried:
dm_workflow.create_hdf5_file('/home/8ididata/2022-1/bluesky202205/B005_Test/test.txt')
and it gave me the same Permission Denied
error;
However when I tried:
dm_workflow.create_hdf5_file('/home/8ididata/2022-1/bluesky202205/test.txt')
it worked.
@sureshnaps I noticed that I cannot change the permission of the folder generated by Eiger, probably because it was under dpuser
. Is it possible to ask DP to change it from their end?
Also attached is the error log from DM. It seems like DM is kicked off, but failing at Stage 1 because the hdf file is not created
@prjemian Suresh suggested switching to 8idiuser login and now the file saving cannot be completed on the HDF plugin. Any suggestions?
Somehow this issue did not prevent Bluesky from acquiring images, and the hdf metadata file was also saved. Marking the issue as solved for now
It's the same problem with directory permissions. The IOC created the directory with the ownership and permissions it had at the time. Look at the directory path and change the ownership and permissions or change the directory.
On Sun, May 22, 2022, 2:15 AM Qingteng Zhang @.***> wrote:
Closed #285 https://github.com/aps-8id-dys/ipython-8idiuser/issues/285 as completed.
— Reply to this email directly, view it on GitHub https://github.com/aps-8id-dys/ipython-8idiuser/issues/285#event-6655770865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMAWC7MQ6LEANRD2PDTVLHNINANCNFSM5WSFYKWQ . You are receiving this because you were mentioned.Message ID: @.***>
Line
dm_workflow.create_hdf5_file(hdf_with_fullpath)
inAD_Acquire
is raising permission error. The issue was not there in the past during Lambda or Rigaku operations. Any suggestions would be appreciated.Full error message below:
Error from IPython terminal
``` In [8]: RE(AD_Acquire(eiger, 'B005_Test', 1e-3, 1e-3, 10000, path='/home/8ididata/2022-1/bluesky202 ...: 205/', submit_xpcs_job=False)) (AD_Acquire): num_images=10000 (EigerDetector): num_images=10000 (EigerDetector): file_name=B005_Test (EigerDetector): hdf.image_dir=/home/8ididata/2022-1/bluesky202205/B005_Test/ (EigerDetector): hdf1 stage_sigs=OrderedDict([('enable', 1), ('create_directory', -3), ('auto_increment', 'Yes'), ('array_counter', 0), ('auto_save', 'Yes'), ('num_capture', 10000), ('file_template', '%s%s_%4.4d.h5'), ('file_write_mode', 'Stream'), ('blocking_callbacks', 'Yes'), ('parent.cam.array_callbacks', 1), ('file_name', 'B005_Test'), ('file_path', '/home/8ididata/2022-1/bluesky202205/B005_Test/'), ('capture', 1)]) Transient Scan ID: 215115 Time: 2022-05-21 13:31:50 Persistent Unique Scan ID: 'dc6814af-41ec-45ea-8064-9debd757c4e0' New stream: 'baseline' New stream: 'Timebase_monitor' New stream: 'pind1_monitor' New stream: 'pind2_monitor' New stream: 'Atten1_monitor' New stream: 'Atten2_monitor' New stream: 'pid1_controlled_value_monitor' New stream: 'pid1_final_value_monitor' New stream: 'primary' +-----------+------------+ | seq_num | time | +-----------+------------+ | 1 | 13:32:01.4 | +-----------+------------+ generator AD_Acquire ['dc6814af'] (scan num: 215115) HDF5 workflow file name: /home/8ididata/2022-1/bluesky202205/B005_Test/B005_Test_0001-10000.hdf Run aborted Traceback (most recent call last): File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/run_engine.py", line 1513, in _run msg = self._plan_stack[-1].send(resp) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 1307, in __call__ return (yield from plan) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 1162, in baseline_wrapper return (yield from plan_mutator(plan, insert_baseline)) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 803, in monitor_during_wrapper return (yield from plan2) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 861, in fly_during_wrapper return (yield from plan2) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/plans/xpcs_acquire.py", line 320, in AD_Acquire return (yield from full_acquire_procedure(md=md)) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1140, in dec_inner return (yield from plan) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 952, in stage_wrapper return (yield from finalize_wrapper(inner(), unstage_devices())) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 509, in finalize_wrapper ret = yield from plan File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 950, in inner return (yield from plan) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1140, in dec_inner return (yield from plan) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 803, in monitor_during_wrapper return (yield from plan2) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 170, in plan_mutator raise ex File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/bluesky/preprocessors.py", line 123, in plan_mutator msg = plan_stack[-1].send(ret) File "/home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/plans/xpcs_acquire.py", line 298, in full_acquire_procedure dm_workflow.create_hdf5_file(hdf_with_fullpath) File "/home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/spec_support/APS_DM_8IDI.py", line 302, in create_hdf5_file with h5py.File(filename, "w-") as f: File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/h5py/_hl/files.py", line 507, in __init__ fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr) File "/home/beams/8IDIUSER/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/h5py/_hl/files.py", line 224, in make_fid fid = h5f.create(name, h5f.ACC_EXCL, fapl=fapl, fcpl=fcpl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 126, in h5py.h5f.create PermissionError: [Errno 13] Unable to create file (unable to open file: name = '/home/8ididata/2022-1/bluesky202205/B005_Test/B005_Test_0001-10000.hdf', errno = 13, error message = 'Permission denied', flags = 15, o_flags = c2) --------------------------------------------------------------------------- PermissionError Traceback (most recent call last) Input In [8], in