[TIMOB-11224] Delete Project: Deleting Project created with sdk folder permission as "Access Files" throws error on Ubuntu
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 2.1.2 |
Fix Version/s | n/a |
Components | Core |
Labels | cb-tooling |
Reporter | Pragya Rastogi |
Assignee | Unknown |
Created | 2012-09-24T07:38:43.000+0000 |
Updated | 2018-02-28T20:03:44.000+0000 |
Description
This is not a Regression issue. issue also occurs on Titanium Studio: 2.1.1
Steps to Reproduce:
1. Navigate to linux folder in /home/global/.titanium/mobilesdk directory.
2. Right click on linux folder and change access permissions from "Create and Delete Files" to "Access Files" for Owner, Group and Others.
3. Click "Apply permissions"
4. Create a new HTML based project from dashboard (Observe "No write permissions" error is thrown.A html project is created in left pane) (Notice this error does not appear if Titanium Mobile project is created).
5. Now change the access permissions of "linux" folder back to "Create and Delete Files".
6. Now try deleting project created in Step 4 by Checking checkbox to delete project on disk.
Actual: Refactoring dialog appears with exception message "Problems encountered while deleting Resources". The issue does not exist in Win 7 and Mac OSX
Expected: Behavior must be same for html and Ti mobile project while creating. And Project should get deleted properly.
Attachments
After some investigation, this looks to be a SDK issue. Basically when the SDK directory (in this case, ~/.titanium/mobilesdk/linux) and its children are set to be read-only, calling the following
will generate a project structure where /home/qa/Titanium_Studio_Worksapce/mobile_html/Resources/mobileweb directory is read-only as well. Subsequently, when we unzip the project template, it contains files for that directory, and unzipping will fail since there is no write permission. And when the SDK directory is set to have both read and write permissions, running the same project.py command will create a project structure with the write permission.
To fix, we need to make sure that files creating when making a new project are not read only.