1.我采用的方法是共享windows下的目录给linux使用,似乎好像很有道理,可是麻烦多多:
? ?似乎linux对windows的兼容性太差。
?
android开发的第一步获取源代码,由于源代码是linux系统的,因此需要samba服务来共享给windows。习惯于windows下开发的用户使用。
其实,直接在linux下工作岂不是更好?
?
麻烦比较多,
?
1.装了samba后,mount命令只能在root权限下运行。mount后的文件路径会自动更改为root权限,不管之前文件夹是什么权限。
通过阅读如下的文章进行了解决:
# mount.cifs //192.168.10.213/mount /home/gamester88/桌面/test -o guest,dir_mode=0777
?
?
?
- ? ? #mount.cifs //192.168.10.213/mount /home/gamester88/桌面/test -o username=root,passwd=123456,dir_mode=0777
?
file_mode=arg
? ?? ?? ???If the server does not support the CIFS Unix extensions this
? ?? ?? ???overrides the default file mode.
? ?? ? dir_mode=arg
? ?? ?? ???If the server does not support the CIFS Unix extensions this
? ?? ?? ???overrides the default mode for directories.
?
2.即使这样复制的时候,也会报错,意思是链接无法使用。所以,使用了cp命令行的方式进行复制。
?
?
总而言之这种方法不推荐。
?
?
?
第二种方法是在linux下建立samba服务器。但是需要root的密码,默认情况下ubuntu的root用户没有开通,需要单独开通:
sudo passwd
进入root状态.命令: su root 然后输入你设置好的密码就OK了.
ubuntu其实可以用root登录的,在系统\系统管理\登录窗口首选项的安全选项夹中勾上允许本地系统管理员登录即可,不过不建议这样做,因为不安全