Skip to content
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

permission denied in clone #4834

Closed
zhoucheng361 opened this issue May 10, 2024 · 0 comments · Fixed by #4856
Closed

permission denied in clone #4834

zhoucheng361 opened this issue May 10, 2024 · 0 comments · Fixed by #4856
Assignees
Labels
kind/bug Something isn't working

Comments

@zhoucheng361
Copy link
Contributor

zhoucheng361 commented May 10, 2024

What happened:
复现步骤:

root@bench-03:~/juicefs# cat .github/scripts/hypo/command_test.py
    def test_clone_4834(self):
        state = JuicefsCommandMachine()
        folders_0 = state.init_folders()
        state.chmod(entry=folders_0, mode=2427, user='root')
        folders_1 = state.mkdir(mode=2931, parent=folders_0, subdir='vhjp', umask=369, user='root')
        state.chmod(entry=folders_1, mode=1263, user='root')
        state.clone(entry=folders_1, new_entry_name='tbim', parent=folders_0, preserve=False, user='user1')
        state.teardown()
root@bench-03:~/juicefs# ./juicefs format redis://localhost/1 redis --enable-acl --trash-days 0
root@bench-03:~/juicefs# ./juicefs mount redis://localhost/1 /tmp/jfs1 -d
root@bench-03:~/juicefs# ./juicefs format mysql://juicedata:juicedata@(127.0.0.1)/test mysql --enable-acl --trash-days 0
root@bench-03:~/juicefs# ./juicefs mount mysql://juicedata:juicedata@(127.0.0.1)/test /tmp/jfs2 -d
root@bench-03:~/juicefs#  python3 .github/scripts/hypo/command_test.py -k test_clone
2024-05-10 18:10:30,221 - INFO - run_cmd: sudo -u user1 ./juicefs clone /tmp/jfs1/fsrand/vhjp /tmp/jfs1/fsrand/tbim
2024-05-10 18:10:30,552 - INFO - do_clone succeed
2024-05-10 18:10:30,552 - INFO - run_cmd: sudo -u user1 ./juicefs clone /tmp/jfs2/fsrand/vhjp /tmp/jfs2/fsrand/tbim
2024-05-10 18:10:30,882 - INFO - do_clone  {} failed:  clone failed: permission denied

F
======================================================================
FAIL: test_clone2 (__main__.TestCommand)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".github/scripts/hypo/command_test.py", line 65, in test_clone2
    state.clone(entry=folders_1, new_entry_name='tbim', parent=folders_0, preserve=False, user='user1')
  File "/root/juicefs/.github/scripts/hypo/command.py", line 155, in clone
    entry = Entries.filter(lambda x: x != multiple()),
  File "/usr/local/lib/python3.8/dist-packages/hypothesis/stateful.py", line 734, in rule_wrapper
    return f(*args, **kwargs)
  File "/root/juicefs/.github/scripts/hypo/command.py", line 155, in clone
    entry = Entries.filter(lambda x: x != multiple()),
  File "/usr/local/lib/python3.8/dist-packages/hypothesis/stateful.py", line 855, in precondition_wrapper
    return f(*args, **kwargs)
  File "/root/juicefs/.github/scripts/hypo/command.py", line 165, in clone
    assert self.equal(result1, result2), f'\033[31mclone:\nresult1 is {result1}\nresult2 is {result2}\033[0m'
AssertionError: clone:
result1 is True
result2 is  clone failed: permission denied

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version:
  • Cloud provider or hardware configuration running JuiceFS:
  • OS (e.g cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Object storage (cloud provider and region, or self maintained):
  • Metadata engine info (version, cloud provider managed or self maintained):
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage):
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants