Brian, Thanks, for your help guys. See my results below.
Here are my results. I'm running on an ssh termial and I find I have to 'su app' to run your command. ls -lZ shows. drwxrwxrwx 2 app app _ 4096 Apr 10 12:59 Camera drwxrwxrwx 2 app app _ 4096 Apr 10 12:59 Downloads drwxrwxrwx 2 app app _ 4096 Apr 22 17:40 Images drwxrwxrwx 3 app app _ 4096 Apr 22 17:40 Sounds drwxrwxrwx 2 app app _ 4096 Apr 10 12:59 Videos I ran the command 'chsmack –a User /opt/usr/media/Downloads' ls -lZ shows. drwxrwxrwx 2 app app _ 4096 Apr 10 12:59 Camera drwxrwxrwx 2 app app _ 4096 Apr 10 12:59 Downloads drwxrwxrwx 2 app app _ 4096 Apr 22 17:40 Images drwxrwxrwx 3 app app _ 4096 Apr 22 17:40 Sounds drwxrwxrwx 2 app app _ 4096 Apr 10 12:59 Videos No, Net change. I'll try again just to see. After running the app. I get these results from 'journalctl -f'. -- Logs begin at Thu 2014-05-22 21:59:26 PDT. -- May 22 16:00:39 ivi_box systemd[1]: Time has been changed May 22 16:00:39 ivi_box systemd[362]: Time has been changed May 22 16:00:39 ivi_box systemd[230]: Time has been changed May 22 16:00:39 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:39 ivi_box su[379]: pam_unix(su:session): session closed for user app May 22 16:00:40 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:41 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:42 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:43 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:44 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:45 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:46 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:47 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:48 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:49 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory May 22 16:00:50 ivi_box WebProcess[388]: file:///opt/usr/apps/intelPoc10/res/wgt/css/car/components/configuration/configuration.js:196:Error occured during opening Documents directory On 22 May 2014 10:53, Whiteman, John L <[email protected]> wrote: > Thanks, Brian. I’m looking at it right now too. I confirmed the behavior > Art reported. File creation is possible with EOY but not with APR. A > patch was submitted a while back to rectify this but did not get merged. > I’m following up on this now. In the meantime, per Brian’s suggestion, > Art, please try chsmack as a workaround if possible. > > > > Best Regards, > > > > John > > > > *From:* IVI [mailto:[email protected]] *On Behalf Of *Jones, > Brian J > *Sent:* Thursday, May 22, 2014 10:45 AM > *To:* McGee, Art; [email protected]; [email protected] > *Subject:* RE: Platform Storage > > > > Hi Art, > > > > That looks right. You might check that the Smack label of the Downloads > directory is set right. If ls –lZ /opt/usr/media doesn’t show the label as > User, use ‘chsmack –a User /opt/usr/media/Downloads’ to fix it. Hopefully > that resolves your issue, if not I’ll dig further to see what might be > going on. > > > > Regards. > > > > *From:* IVI [mailto:[email protected]<[email protected]>] > *On Behalf Of *McGee, Art > *Sent:* Thursday, May 22, 2014 7:58 AM > *To:* [email protected]; [email protected] > *Subject:* Platform Storage > > > > I'm working on an app that stores and reads from the Downloads directory > on the system using. I seem to having an error when trying to access that > storage location. This seems to be a change from EOY release and the APR22 > release. Please advise if I'm using this incorrectly or if something has > changed in the security model. > > > > Thanks, > > > > Art > > > > It asks for permission using the config.xml file with the following. > > <tizen:privilege name=" > http://tizen.org/privilege/filesystem.read" /> > > <tizen:privilege name=" > http://tizen.org/privilege/filesystem.write" /> > > > > The code that seems to have the fault. > > if (typeof(tizen) !== 'undefined') { > > *// Has this called changed or should I be > requesting permission by another means? Note this._settingsStorageName = > "downloads"* > tizen.filesystem.resolve(this._settingsStorageName, > function(directory) { > var settingsFile; > try { > settingsFile = > directory.resolve(self._settingsFileName); > } catch(ex) { > console.warn("Settings file doesn't exist, creating > ...", ex); > settingsFile = > directory.createFile(self._settingsFileName); > } > > settingsFile.readAsText(function(contents) { > //console.log("Settings file contents", contents); > var configValues = null; > > if (contents.length > 0) { > try { > configValues = JSON.parse(contents); > } > catch (ex) { > console.error("Error occured during parsing > settings file", ex); > aCallback(ex); > } > } > > if (!configValues || !configValues.version || > configValues.version < self._values.version) { > configValues = jQuery.extend({}, self._values); > self.save(); > } > //console.log("Loaded settings:", configValues); > > if (JSON.stringify(configValues) !== > JSON.stringify(self._values)) { > console.log("Settings updated."); > self._values = configValues; > self._callListeners(); > } > > aCallback(); > }, function(ex) { > console.error("Cannot read settings file", ex); > aCallback(ex); > }); > }, function(error) { > > > console.error("Error occured during opening Documents > directory", error); *// This is the line that reports the error.* > aCallback(error); > }, "rw"); > } else { > console.warn("Tizen API is not available, cannot read settings > from persistent storage."); > aCallback(); > } > > > > > -- Art McGee Infotainment Engineer Jaguar Land Rover One World Trade Center, 121 Southwest Salmon Street, 11th Floor, Portland, Oregon, 97204
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
