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

Can I set file permissions? #441

Open
yanhaogang opened this issue Aug 28, 2023 · 2 comments
Open

Can I set file permissions? #441

yanhaogang opened this issue Aug 28, 2023 · 2 comments

Comments

@yanhaogang
Copy link

Whether the file permission can be set, for example, LOCK. *.log, I need 640,but these files are 644,I can not update the permission.

@tolex469
Copy link

Yes it can

@yanhaogang
Copy link
Author

if !readOnly {
logw, err = os.OpenFile(filepath.Join(path, "LOG"), os.O_WRONLY|os.O_CREATE, 0644)
if err != nil {
return nil, err
}
logSize, err = logw.Seek(0, os.SEEK_END)
if err != nil {
logw.Close()
return nil, err
}
}

How do i cover 644?

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

No branches or pull requests

2 participants