Author Topic: No access to Samba share  (Read 1798 times)

Offline gilada

  • Single posting newcomer
  • *
  • Posts: 6
No access to Samba share
« on: February 11, 2017, 01:22:24 pm »
Hi, am new here and learn diligently, my English is intended for household use.
Got here with Win7 and CodeBlocks share issues in connection to a Samba directory, create that a new project will fail with the message "can't create output directory". Via MS Explorer, I have no problems with it.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2464
Re: No access to Samba share
« Reply #1 on: February 11, 2017, 05:50:45 pm »
try to not use special characters, or points in your path to the project. Or make sure that you have write access. If the explorer works codeblocks should to...

can you give us the path?

Offline gilada

  • Single posting newcomer
  • *
  • Posts: 6
Re: No access to Samba share
« Reply #2 on: February 12, 2017, 07:21:46 pm »
thx no use special characters. Use this \\Share\Project\Test. give write access for codeblocks

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2464
Re: No access to Samba share
« Reply #3 on: February 12, 2017, 08:58:39 pm »
so your problem is solved? or is it still there?
If it is not solved: Have you tried to create a simple text file with notepad on the share, open it with codeblocks, try to modify and save it?

I don't think the problem is within codeblocks....

Offline gilada

  • Single posting newcomer
  • *
  • Posts: 6
Re: No access to Samba share
« Reply #4 on: February 13, 2017, 04:46:52 pm »
My problem is still there. I can directory save a Notepad file on the share, and open with CodeBlocks, changes and save.

What is but does not work on the share create a new project, also the build and run out then, in the create the directory of debug, etc. Try to inform an image to upload.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2464
Re: No access to Samba share
« Reply #5 on: February 13, 2017, 05:44:33 pm »
This image does not help...

Can you create a .cbp file with the notepad with exact the same path as codeblocks would?
Can you create a text file on the share and rename it from Test.txt to test.cbp  (you have to enable the show extension option in the folder settings for this)?
Can you create folders with the explorer on the share?
Can you create a project locally?
Can you copy the local project to the share and use it in codeblocks from there?

Does codeblocks runs as a other user?

It makes no sens that you can create folders/files with the explorer but not create files with codeblocks...
Things i can think of:
1) Special characters (all non ascii characters or space) in the path/project name
2) You don't have write access on the network drive
3) You don't have permission to create folders on the network drive
4) You don't have permission to create special files (for ex. files with the cpp or cbp file endings) (this would be very strange)
5) Your anti virus or firewall is blocking codeblocks

Offline gilada

  • Single posting newcomer
  • *
  • Posts: 6
Re: No access to Samba share
« Reply #6 on: February 13, 2017, 07:32:22 pm »
Can you create a .cbp file with the notepad with exact the same path as codeblocks would? YES
Can you create a text file on the share and rename it from Test.txt to test.cbp  (you have to enable the show extension option in the folder settings for this)? YES
Can you create folders with the explorer on the share? YES
Can you create a project locally? YES
Can you copy the local project to the share and use it in codeblocks from there? YES works even build and run (cout output changed)
Does codeblocks runs as a other user? NO

The points 1 to 5;
1. no
2. no
3. no (via Explorer no problem)
4. has what, how can I check this
5. my firewall / antivirus is AVG, I inserted a registration for codeblock.exe there.

Do next tomorrow, for example: mapping

Offline gilada

  • Single posting newcomer
  • *
  • Posts: 6
Re: No access to Samba share
« Reply #7 on: February 14, 2017, 10:00:55 am »
Disable firewall and AVG, problem remains. It is not even time

Was the share mapped (X:), and behold codeblocks creates a new project and build run works too. Thus one can come out.

However, it should be mentioned that working codeblocks on linux without mapping.  ;)

Online sodev

  • Regular
  • ***
  • Posts: 315
Re: No access to Samba share
« Reply #8 on: February 14, 2017, 01:09:19 pm »
Well, i guess the problem was that you tried to access your project directly through an UNC path. This cant be done with standard c++ or wxWidgets without using specially crafted path names that CodeBlocks apparently doesnt use.

However using a regular path, something with a drive letter, does, so thats why you could fix it this way. Technically you also have a "mapping" on linux, basically everything is mapped there on a regular path in the filesystem so you dont have these issues there. You can access pretty much everything with regular paths, no special handling necessary there ;).

Offline gilada

  • Single posting newcomer
  • *
  • Posts: 6
Re: No access to Samba share
« Reply #9 on: February 15, 2017, 04:27:08 pm »
Working codeblocks with the UNC path (Win7)? If Yes, what needs to be done.
« Last Edit: February 15, 2017, 04:29:37 pm by gilada »

Online sodev

  • Regular
  • ***
  • Posts: 315
Re: No access to Samba share
« Reply #10 on: February 15, 2017, 04:56:58 pm »
As you already figured out by yourself, no it doesnt. And why do you store your project on a network path anyway? For shared access? For backup purposes? Use a revision control system (svn, git, whatever) and use a local disk to work on!

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2464
Re: No access to Samba share
« Reply #11 on: February 15, 2017, 08:09:45 pm »
UNC  *head bump* i forget about them... why not use the traditional windows approach with mapped network drives? Remember, remember compiling/linking will be impacted a lot by your network speed if you use a network drive...