Merge branch 'master' of http://1.14.125.6:3000/mianbin/ops-pro
This commit is contained in:
commit
19e4bd819a
@ -870,10 +870,15 @@ public class SftpUploadUtil {
|
|||||||
|
|
||||||
channelSftp = (ChannelSftp) channel;
|
channelSftp = (ChannelSftp) channel;
|
||||||
|
|
||||||
|
if (remoteDir.contains("default")){
|
||||||
String chmodDir = remoteDir.substring(0, remoteDir.indexOf("default"));
|
String chmodDir = remoteDir.substring(0, remoteDir.indexOf("default"));
|
||||||
log.info("分配权限路径,{}",chmodDir);
|
log.info("分配权限路径,{}",chmodDir);
|
||||||
// 切换目录并列出内容用于调试
|
|
||||||
sudoChmodORwx(session,chmodDir,password);
|
sudoChmodORwx(session,chmodDir,password);
|
||||||
|
} else {
|
||||||
|
log.warn("路径中未找到 'default',跳过权限设置。当前路径: {}", remoteDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换目录并列出内容用于调试
|
||||||
|
|
||||||
// 切换到目标目录
|
// 切换到目标目录
|
||||||
channelSftp.cd(remoteDir);
|
channelSftp.cd(remoteDir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user