现在的位置: 首页 > 综合 > 正文

Mac OSX 创建私密文件夹(文件夹单独加密)

2018年05月17日 ⁄ 综合 ⁄ 共 605字 ⁄ 字号 评论关闭

转载自:http://www.nooidea.com/1000-How-To/create-a-password-protected-secured-folder-under-mac-osx/

Mac OSX 创建私密文件夹(文件夹单独加密)

Mac
OSX
, by AppleCN.

Mac 平台下最好的做法就是设置文件夹访问权限,打开终端,给文件夹设置访问权限 sudo chmod 700 文件夹,然后其他用户就访问不了。
关于unix权限的资料网上很多,这里我给大家介绍如何通过applescript给文件夹设置保护。
在文件夹上右键,设置文件夹操作脚本,修改open操作,复制下面代码替换原来的提示注视。

on opening folder this_folder
tell application “Finder”
set dialogresult to display dialog “输入密码我瞧瞧也!:” buttons {“确认”} default button 1 default answer ” ”
set PWText to the text returned of dialogresult
if not PWText = “你的密码” then
close folder this_folder
beep 3
display dialog “不能让你看了。。” buttons {“关闭!”}
end if
end tell
end opening folder

打开文件夹的时候就会要求输入密码,错误则无法继续访问

抱歉!评论已关闭.