Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
985bd0ac
Commit
985bd0ac
authored
Feb 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed permission errors.
parent
070528d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
file_system.go
file_system.go
+8
-2
samples/hello_fs.go
samples/hello_fs.go
+8
-2
server.go
server.go
+2
-0
No files found.
file_system.go
View file @
985bd0ac
...
...
@@ -96,11 +96,17 @@ const RootInodeID InodeID = InodeID(bazilfuse.RootID)
// Attributes for a file or directory inode. Corresponds to struct inode (cf.
// http://goo.gl/tvYyQt).
type
InodeAttributes
struct
{
Size
uint64
Mode
os
.
FileMode
Size
uint64
Mode
os
.
FileMode
// Time information
Atime
time
.
Time
Mtime
time
.
Time
Crtime
time
.
Time
// Owner information
Uid
uint32
Gid
uint32
}
// A generation number for an inode. Irrelevant for file systems that won't be
...
...
samples/hello_fs.go
View file @
985bd0ac
...
...
@@ -22,6 +22,10 @@ import (
type
HelloFS
struct
{
fuseutil
.
NotImplementedFileSystem
Clock
timeutil
.
Clock
// Set by Init.
Uid
uint32
Gid
uint32
}
var
_
fuse
.
FileSystem
=
&
HelloFS
{}
...
...
@@ -48,8 +52,6 @@ var gInodeInfo = map[fuse.InodeID]inodeInfo{
// root
rootInode
:
inodeInfo
{
attributes
:
fuse
.
InodeAttributes
{
// TODO(jacobsa): Why do we get premission denied errors when this is
// 0500?
Mode
:
0500
|
os
.
ModeDir
,
},
dir
:
true
,
...
...
@@ -119,6 +121,8 @@ func findChildInode(
func
(
fs
*
HelloFS
)
patchAttributes
(
attr
*
fuse
.
InodeAttributes
)
{
now
:=
fs
.
Clock
.
Now
()
attr
.
Uid
=
fs
.
Uid
attr
.
Gid
=
fs
.
Gid
attr
.
Atime
=
now
attr
.
Mtime
=
now
attr
.
Crtime
=
now
...
...
@@ -129,6 +133,8 @@ func (fs *HelloFS) Init(
req
*
fuse
.
InitRequest
)
(
resp
*
fuse
.
InitResponse
,
err
error
)
{
resp
=
&
fuse
.
InitResponse
{}
fs
.
Uid
=
req
.
Uid
fs
.
Gid
=
req
.
Gid
return
}
...
...
server.go
View file @
985bd0ac
...
...
@@ -224,5 +224,7 @@ func convertAttributes(inode InodeID, attr InodeAttributes) bazilfuse.Attr {
Atime
:
attr
.
Atime
,
Mtime
:
attr
.
Mtime
,
Crtime
:
attr
.
Crtime
,
Uid
:
attr
.
Uid
,
Gid
:
attr
.
Gid
,
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment