You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2021/11/15 03:40:15 UTC

[incubator-linkis] branch dev-1.0.3 updated: bugfix:local file permission

This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.0.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.0.3 by this push:
     new ba0cba2  bugfix:local file permission
     new f86c757  Merge pull request #1090 from casionone/bugfix1
ba0cba2 is described below

commit ba0cba228a7cd5a01250e404140446495f9b8945
Author: casionone <ca...@gmail.com>
AuthorDate: Mon Nov 15 10:45:31 2021 +0800

    bugfix:local file permission
---
 .../org/apache/linkis/storage/fs/impl/LocalFileSystem.java  | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/fs/impl/LocalFileSystem.java b/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/fs/impl/LocalFileSystem.java
index dba72cc..1f757ee 100644
--- a/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/fs/impl/LocalFileSystem.java
+++ b/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/fs/impl/LocalFileSystem.java
@@ -196,20 +196,7 @@ public class LocalFileSystem extends FileSystem {
 
     @Override
     public boolean setPermission(FsPath dest, String permission) throws IOException {
-        if (!StorageUtils.isIOProxy()){
-            LOG.info("io not proxy, setPermission as parent.");
-            try {
-                PosixFileAttributes attr  = Files.readAttributes(Paths.get(dest.getParent().getPath()), PosixFileAttributes.class);
-                LOG.debug("parent permissions: attr: " + attr);
-                Files.setPosixFilePermissions(Paths.get(dest.getPath()), attr.permissions());
-
-            }catch (NoSuchFileException e){
-                LOG.error("File or folder does not exist or file name is garbled(文件或者文件夹不存在或者文件名乱码)",e);
-                throw new StorageWarnException(51001,e.getMessage());
-            }
-            return true;
 
-        }
         String path = dest.getPath();
         if(StringUtils.isNumeric(permission)) {
             permission = FsPath.permissionFormatted(permission);

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org