diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-09-24 18:21:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-24 18:21:34 -0700 |
| commit | 043b0631369bec00b33eb53cdf2cdef3eced006c (patch) | |
| tree | 72e1b320c3487aa5f6cb3cd5fc849bfd94108ec8 /weed/command/mount_std.go | |
| parent | dbf5327b9874bf7137eb53cbe04cd362efeb864c (diff) | |
| parent | 48c578410fea2128f81356250b2cd9d56074d878 (diff) | |
| download | seaweedfs-043b0631369bec00b33eb53cdf2cdef3eced006c.tar.xz seaweedfs-043b0631369bec00b33eb53cdf2cdef3eced006c.zip | |
Merge pull request #1482 from hilimd/master
Fix: s3 delete object
Diffstat (limited to 'weed/command/mount_std.go')
| -rw-r--r-- | weed/command/mount_std.go | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 3947a871a..7c0f56d3a 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/chrislusf/seaweedfs/weed/filesys/meta_cache" "os" - "os/user" "path" "runtime" "strconv" @@ -87,34 +86,11 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { fuse.Unmount(dir) - uid, gid := uint32(0), uint32(0) - // detect mount folder mode if *option.dirAutoCreate { - os.MkdirAll(dir, os.FileMode(0777) &^ umask) + os.MkdirAll(dir, os.FileMode(0777)&^umask) } - mountMode := os.ModeDir | 0755 fileInfo, err := os.Stat(dir) - if err == nil { - mountMode = os.ModeDir | fileInfo.Mode() - uid, gid = util.GetFileUidGid(fileInfo) - fmt.Printf("mount point owner uid=%d gid=%d mode=%s\n", uid, gid, fileInfo.Mode()) - } else { - fmt.Printf("can not stat %s\n", dir) - return false - } - - if uid == 0 { - if u, err := user.Current(); err == nil { - if parsedId, pe := strconv.ParseUint(u.Uid, 10, 32); pe == nil { - uid = uint32(parsedId) - } - if parsedId, pe := strconv.ParseUint(u.Gid, 10, 32); pe == nil { - gid = uint32(parsedId) - } - fmt.Printf("current uid=%d gid=%d\n", uid, gid) - } - } // mapping uid, gid uidGidMapper, err := meta_cache.NewUidGidMapper(*option.uidMap, *option.gidMap) @@ -174,9 +150,6 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { CacheSizeMB: *option.cacheSizeMB, DataCenter: *option.dataCenter, EntryCacheTtl: 3 * time.Second, - MountUid: uid, - MountGid: gid, - MountMode: mountMode, MountCtime: fileInfo.ModTime(), MountMtime: time.Now(), Umask: umask, |
