We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f09dc85 commit 8d4d382Copy full SHA for 8d4d382
apps/dashboard/app/models/posix_file.rb
@@ -151,7 +151,14 @@ def handle_upload(tempfile)
151
FileUtils.mv tempfile, path.to_s
152
File.chmod(mode, path.to_s)
153
154
- path.chown(nil, path.parent.stat.gid) if path.parent.setgid?
+ begin
155
+ gid = path.parent.stat.gid
156
+ path.chown(nil, gid) if path.parent.setgid?
157
+ rescue StandardError => e
158
+ Rails.logger.info("Cannot change group ownership of #{path} to #{gid} because of error: #{e}")
159
+ end
160
+
161
+ nil
162
end
163
164
def can_download_as_zip?(timeout: Configuration.file_download_dir_timeout, download_directory_size_limit: Configuration.file_download_dir_max)
0 commit comments