Skip to content

feat: implement chmod/chown/utimens, fix access perms, add --allow-root#7

Merged
Zhihaoi merged 1 commit into
thustorage:mainfrom
haoren3696:main
May 25, 2026
Merged

feat: implement chmod/chown/utimens, fix access perms, add --allow-root#7
Zhihaoi merged 1 commit into
thustorage:mainfrom
haoren3696:main

Conversation

@haoren3696
Copy link
Copy Markdown
Contributor

I attempted to compile, build, and install ContextFS on the ContextFS file system and encountered the following issue. After troubleshooting, it was confirmed that the current ContextFS is missing the utimens, chmod, and chown FUSE handlers.I believe that as an Agent file system, ContextFS needs to first support compiling, building, and installing ContextFS within the ContextFS file system.

The following error is reported:

[root@LAPTOP-CG8RLAN9 ContextFS]# agentvfs workspace init selfhost --from .
name=selfhost
source=/run/user/0/agentvfs/selfhost/source
seeded_from=.
status=initialized
[root@LAPTOP-CG8RLAN9 ContextFS]# agentvfs workspace start selfhost
warning=no usable telemetry backend found; mounted without telemetry
name=selfhost
mount=/run/user/0/agentvfs/selfhost/mount
socket=/run/user/0/agentvfs/selfhost/control.sock
store=/run/user/0/agentvfs/selfhost/store
telemetry=none
status=started
[root@LAPTOP-CG8RLAN9 ContextFS]# cd /run/user/$(id -u)/agentvfs/selfhost/mount
[root@LAPTOP-CG8RLAN9 mount]# rm -rf build
[root@LAPTOP-CG8RLAN9 mount]# cmake -B build -DAGENTVFS_EBPF=OFF
CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:224 (configure_file):
  Function not implemented
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- The C compiler identification is GNU 12.3.1
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake:226 (configure_file):
  Function not implemented
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- The CXX compiler identification is GNU 12.3.1
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:232 (configure_file):
  Function not implemented
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Detecting C compiler ABI info
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile):
  Failed to set working directory to
  /run/user/0/agentvfs/selfhost/mount/build/CMakeFiles/CMakeScratch/TryCompile-C3q7JD
  : Permission denied
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!

Code Modification Summary:

  • Add utimens, chmod, chown FUSE handlers to silence ENOSYS on touch, chmod, chown, cp -p, rsync -a
  • Fix cas_access to check owner permission bits (0400/0200/0100) instead of other bits (0004/0002/0001), fixing chdir EACCES on owner-only directories
  • Add --allow-root flag to 'agentvfs workspace init/start', persisted in workspace.json, passes -o allow_root to the FUSE daemon
  • Document self-hosting workflow in README

- Add utimens, chmod, chown FUSE handlers to silence ENOSYS on touch,
  chmod, chown, cp -p, rsync -a
- Fix cas_access to check owner permission bits (0400/0200/0100)
  instead of other bits (0004/0002/0001), fixing chdir EACCES on
  owner-only directories
- Add --allow-root flag to 'agentvfs workspace init/start', persisted
  in workspace.json, passes -o allow_root to the FUSE daemon
- Document self-hosting workflow in README

Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
@Zhihaoi
Copy link
Copy Markdown
Collaborator

Zhihaoi commented May 25, 2026

LGTM

@Zhihaoi Zhihaoi merged commit 10ee384 into thustorage:main May 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants