Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Give all permissions on files (777) on the smb mount
Browse files Browse the repository at this point in the history
Allows any script files to be executed
  • Loading branch information
lmakarov committed Nov 16, 2015
1 parent 30a5625 commit 6b2bd7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Vagrant.configure("2") do |config|
config.vm.provision "shell", run: "always" do |s|
s.inline = <<-SCRIPT
mkdir -p vagrant $2
mount -t cifs -o uid=`id -u docker`,gid=`id -g docker`,sec=ntlm,username=$3,pass=$4,dir_mode=0777,file_mode=0666 //$5/$1 $2
mount -t cifs -o uid=`id -u docker`,gid=`id -g docker`,sec=ntlm,username=$3,pass=$4,dir_mode=0777,file_mode=0777 //$5/$1 $2
SCRIPT
s.args = "#{vagrant_folder_name} #{vagrant_mount_point} #{$vconfig['synced_folders']['smb_username']} #{$vconfig['synced_folders']['smb_password']} #{host_ip}"
end
Expand Down

3 comments on commit 6b2bd7d

@xinity
Copy link

@xinity xinity commented on 6b2bd7d Nov 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the deal with this commit ? as several web apps are checking directory permissions and yet freeze when directories are using 777mode :(

i would higly recommend using dir_mode=0770 and file_mode=0660

that"s what we use in our own implementation of boot2docker-vagrant and it's working perfectly

@lmakarov
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit changing permissions on files from 666 to 777 only.
The reason is to allow for shell scripts or any binaries to be executed (e.g. custom project shell scripts, node/composer/etc. binaries local to the project).

several web apps are checking directory permissions and yet freeze when directories are using 777 mode

Do you have examples of what's failing?

@xinity
Copy link

@xinity xinity commented on 6b2bd7d Dec 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is to allow for shell scripts or any binaries to be executed (e.g. custom project shell scripts, node/composer/etc. binaries local to the project).

some webapps tied to security will fail if directories are mod 777, like packetfence for example.
if binary execution is needed, then best way is to manually set the execution permission, or so i think.
I deeply think a mountpoint with 777 permission is wrong ( no harm )

Please sign in to comment.