Using Smba to implement write programs on Windows, run on Linux

Source: Internet
Author: User

1. Download the program code in Linux (make sure you get the correct file attributes)

2, in the Windows code, for the existing code, do not change the file permissions, such as the original 755, change the contents of the file is still 755 after the file, if you want to create a new file, the default is 644, other permissions, you need to set up in Linux with chmod

3, changes completed directly in the Windows upload, uploaded to the server file permissions consistent with the Linux upload.

1th, nothing strange, the file permissions are lost when you download the code with GIT on Windows

For the 2nd, it needs to be set in Smba, where the/etc/samba/smb.conf of these lines can be canceled to resolve the problem that the modified file does not change its permissions.

[CPP] View plain copy

    1. Map archive = No
    2. Map hidden = no
    3. Map Read Only = no
    4. Map system = No
    5. Store DOS attributes = yes

For the 3rd, but also I spend the longest time, it is in the Tortisegit settings, so that upload files only upload file content, ignore the file permissions, the specific settings are as follows,

git config--global core.filemode false

git config core.filemode false

These two lines of code I toss for a long time, later to understand,

As shown in the following:

After clicking Settings:

Click Edit local Git/config and edit global Gitconfig

Add Filemode=false in the edit box to

Because my edit local may have been edited, and then Gray, if you can point it in, then remember to add the corresponding code

Using Smba to implement write programs on Windows, run on Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.