Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ sudo cmake --install build

```bash
# Linux (openEuler)
dnf install -y cmake clang fuse3-devel bpftool libbpf-devel
sudo dnf install -y cmake clang fuse3-devel bpftool libbpf-devel
cmake -B build && cmake --build build -j
sudo cmake --install build
./start.sh /path/to/project
Expand Down
4 changes: 3 additions & 1 deletion src/cas/platform/linux/fuse_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ static int cas_getattr(const char* path, struct stat* st, struct fuse_file_info*
if (std::strcmp(path, "/") == 0) {
st->st_mode = S_IFDIR | 0755;
st->st_nlink = 2;
st->st_uid = fuse_get_context()->uid;
st->st_gid = fuse_get_context()->gid;
return 0;
}

Expand All @@ -60,7 +62,7 @@ static int cas_getattr(const char* path, struct stat* st, struct fuse_file_info*

switch (entry->kind) {
case EntryKind::Blob: st->st_mode = S_IFREG | (entry->mode & 07777); break;
case EntryKind::Tree: st->st_mode = S_IFDIR | (entry->mode & 07777); st->st_nlink = 2; return 0;
case EntryKind::Tree: st->st_mode = S_IFDIR | (entry->mode & 07777); st->st_nlink = 2; st->st_uid = fuse_get_context()->uid; st->st_gid = fuse_get_context()->gid; return 0;
case EntryKind::Symlink: st->st_mode = S_IFLNK | 0777; break;
default: return -ENOENT;
}
Expand Down
4 changes: 4 additions & 0 deletions src/cas/platform/macos/fuse_t_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ static int cas_getattr(const char* path, struct stat* st) {
if (std::strcmp(path, "/") == 0) {
st->st_mode = S_IFDIR | 0755;
st->st_nlink = 2;
st->st_uid = fuse_get_context()->uid;
st->st_gid = fuse_get_context()->gid;
return 0;
}

Expand All @@ -77,6 +79,8 @@ static int cas_getattr(const char* path, struct stat* st) {
case EntryKind::Tree:
st->st_mode = S_IFDIR | (entry->mode & 07777);
st->st_nlink = 2;
st->st_uid = fuse_get_context()->uid;
st->st_gid = fuse_get_context()->gid;
return 0;
case EntryKind::Symlink:
st->st_mode = S_IFLNK | 0777; break;
Expand Down
Loading