Regarding the issue of writing permissions
ArSrNa opened this issue · comments
If I run a nodejs code with root permission, including the content of the db.update
updates database, nedb will change the corresponding database file uid and gid to root permission (uid and gid is 0). Use fs.statSync()
for checking.
This will cause me to use a non root user to execute the nodejs code that db.find()
reads nedb, and will prompt ErrorEACCES: permission denied, open mnt/data.json.
This problem can be replicated on the SCF mount to CFS of Tencent Cloud, which is used as the storage database.